### 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)

}
		int col, h, section;
		TreeItem *it = _find_item_at_pos(root, pos, col, h, section);
		if (it) {
			const TreeItem::Cell &c = it->cells[col];
			int col_width = get_column_width(col);
			for (int i = 0; i < col; i++) {
				pos.x -= get_column_width(i);
			}
			for (int j = c.buttons.size() - 1; j >= 0; j--) {
				Ref<Texture2D> b = c.buttons[j].texture;
				Size2 size = b->get_size() + theme_cache.button_pressed->get_minimum_size();
				if (pos.x > col_width - size.width) {
					return c.buttons[j].id;
				}
				col_width -= size.width;
			}
		}
	}
	return -1;
}
String Tree::get_tooltip(const Point2 &p_pos) const {
	if (root) {
		Point2 pos = p_pos;
		pos -= theme_cache.panel_style->get_offset();
		pos.y -= _get_title_button_height();
		if (pos.y < 0) {
			return Control::get_tooltip(p_pos);
		}
		Point2 button_pos = pos;