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

case NOTIFICATION_INTERNAL_PHYSICS_PROCESS: {
			if (drag_touching) {
				if (drag_touching_deaccel) {
					float pos = v_scroll->get_value();
					pos += drag_speed * get_physics_process_delta_time();
					bool turnoff = false;
					if (pos < 0) {
						pos = 0;
						turnoff = true;
						set_physics_process_internal(false);
						drag_touching = false;
						drag_touching_deaccel = false;
					}
					if (pos > (v_scroll->get_max() - v_scroll->get_page())) {
						pos = v_scroll->get_max() - v_scroll->get_page();
						turnoff = true;
					}
					v_scroll->set_value(pos);
					float sgn = drag_speed < 0 ? -1 : 1;
					float val = Math::abs(drag_speed);
					val -= 1000 * get_physics_process_delta_time();
					if (val < 0) {
						turnoff = true;
					}
					drag_speed = sgn * val;
					if (turnoff) {
						set_physics_process_internal(false);
						drag_touching = false;
						drag_touching_deaccel = false;
					}