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

next = _n;
			} else {
				break;
			}
		}
		if (next == selected_item) {
			return;
		}
		if (select_mode == SELECT_MULTI) {
			selected_item = next;
			emit_signal(SNAME("cell_selected"));
			queue_redraw();
		} else {
			while (next && !next->cells[selected_col].selectable) {
				next = next->get_next_visible();
			}
			if (!next) {
				return; 
			}
			next->select(selected_col);
		}
		ensure_cursor_is_visible();
	} else if (p_event->is_action("ui_page_up", true) && p_event->is_pressed()) {
		if (!cursor_can_exit_tree) {
			accept_event();
		}
		TreeItem *prev = nullptr;
		if (!selected_item) {
			return;
		}