### Godot version

4.2 Stable

### System information

Linux

### Issue description

Calling TreeItem set_text() on a TreeItem that was removed via remove_child() causes debugging to end and the application to close without any error message.

### Steps to reproduce

Run the included example to get the debugger to crash. Comment out "treeItem.remove_child(subTreeItem)" for normal behaviour. 

### Minimal reproduction project

[treeItemCrash.zip](https://github.com/godotengine/godot/files/13534005/treeItemCrash.zip)

if (p_pos.y - theme_cache.offset.y > (p_draw_size.height)) {
		return -1; 
	}
	if (!p_item->is_visible()) {
		return 0;
	}
	RID ci = get_canvas_item();
	int htotal = 0;
	int label_h = 0;
	bool rtl = cache.rtl;
	
	bool skip = (p_item == root && hide_root);
	if (!skip) {
		
		ERR_FAIL_COND_V(theme_cache.font.is_null(), -1);
		int ofs = p_pos.x + ((p_item->disable_folding || hide_folding) ? theme_cache.h_separation : theme_cache.item_margin);
		int skip2 = 0;
		for (int i = 0; i < columns.size(); i++) {
			if (skip2) {
				skip2--;
				continue;
			}
			int item_width = get_column_width(i);