### Godot version

v4.2.rc.custom_build [702227129]

### System information

Godot v4.2.rc (702227129) - Debian GNU/Linux trixie/sid trixie - X11 - Vulkan (Forward+) - dedicated NVIDIA GeForce GTX 1060 6GB (nvidia) - AMD Ryzen 5 1600 Six-Core Processor (12 Threads)

### Issue description

Found a consistent crash when calling `hide()` from `_notification()`.
It does not happen if the call is deferred.

### Steps to reproduce

The `hide_test.gd` script has a boolean `cause_crash`. If it is true, hovering the mouse over the label crashes without an error in the Godot Editor Console. If it's false it hides the label as expected.

### Minimal reproduction project

[hide_crash.zip](https://github.com/godotengine/godot/files/13452818/hide_crash.zip)

}
	}
	Ref<InputEventGesture> gesture_event = p_event;
	if (gesture_event.is_valid()) {
		gui.key_event_accepted = false;
		_gui_cancel_tooltip();
		Size2 pos = gesture_event->get_position();
		Control *over = gui_find_control(pos);
		if (over) {
			bool stopped = false;
			if (over->can_process()) {
				gesture_event = gesture_event->xformed_by(Transform2D()); 
				pos = over->get_global_transform_with_canvas().affine_inverse().xform(pos);
				gesture_event->set_position(pos);
				stopped = _gui_call_input(over, gesture_event);
			}
			if (stopped) {
				set_input_as_handled();
			}
			return;
		}
	}
	Ref<InputEventScreenDrag> drag_event = p_event;
	if (drag_event.is_valid()) {
		const int drag_event_index = drag_event->get_index();
		ObjectID control_id = gui.touch_focus[drag_event_index];
		Control *over = control_id.is_valid() ? Object::cast_to<Control>(ObjectDB::get_instance(control_id)) : nullptr;
		if (!over) {
			over = gui_find_control(drag_event->get_position());
		}