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

ERR_FAIL_INDEX(p_column, columns.size());
	if (columns[p_column].expand == p_expand) {
		return;
	}
	columns.write[p_column].expand = p_expand;
	columns.write[p_column].cached_minimum_width_dirty = true;
	queue_redraw();
}
void Tree::set_column_expand_ratio(int p_column, int p_ratio) {
	ERR_FAIL_INDEX(p_column, columns.size());
	if (columns[p_column].expand_ratio == p_ratio) {
		return;
	}
	columns.write[p_column].expand_ratio = p_ratio;
	columns.write[p_column].cached_minimum_width_dirty = true;
	queue_redraw();
}
void Tree::set_column_clip_content(int p_column, bool p_fit) {
	ERR_FAIL_INDEX(p_column, columns.size());
	if (columns[p_column].clip_content == p_fit) {
		return;
	}
	columns.write[p_column].clip_content = p_fit;
	columns.write[p_column].cached_minimum_width_dirty = true;
	queue_redraw();
}
bool Tree::is_column_expanding(int p_column) const {