### 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 (root) {
		Point2 pos = p_pos;
		if (is_layout_rtl()) {
			pos.x = get_size().width - pos.x;
		}
		pos -= theme_cache.panel_style->get_offset();
		pos.y -= _get_title_button_height();
		if (pos.y < 0) {
			return -1;
		}
		if (h_scroll->is_visible_in_tree()) {
			pos.x += h_scroll->get_value();
		}
		if (v_scroll->is_visible_in_tree()) {
			pos.y += v_scroll->get_value();
		}
		int col, h, section;
		TreeItem *it = _find_item_at_pos(root, pos, col, h, section);
		if (it) {
			return col;
		}
	}
	return -1;
}
int Tree::get_drop_section_at_position(const Point2 &p_pos) const {