### Godot version

2992ffd25523cb8b3e0ef1b873c40115b8940178

### System information

Windows 10

### Issue description

Godot crashes randomly within a few seconds after project start when moving with the mouse.

![win_err](https://github.com/godotengine/godot/assets/52464204/1da28596-d95b-40f3-b32f-12219ec02c5d)

Started after recent merge of https://github.com/godotengine/godot/pull/67791.
I can confirm that reverting the pr fixes the crashes.

### Steps to reproduce

see desc

### Minimal reproduction project

N/A
ERR_MAIN_THREAD_GUARD;
	if (!is_inside_tree() || !visible || updating_child_controls) {
		return;
	}
	updating_child_controls = true;
	call_deferred(SNAME("_update_child_controls"));
}
void Window::_update_child_controls() {
	if (!updating_child_controls) {
		return;
	}
	_update_window_size();
	updating_child_controls = false;
}
bool Window::_can_consume_input_events() const {
	return exclusive_child == nullptr;
}
void Window::_window_input(const Ref<InputEvent> &p_ev) {
	if (EngineDebugger::is_active()) {
		
		
		if (debugger_stop_shortcut.is_null()) {
			String shortcut_str = OS::get_singleton()->get_environment("__GODOT_EDITOR_STOP_SHORTCUT__");
			if (!shortcut_str.is_empty()) {
				Variant shortcut_var;
				VariantParser::StreamString ss;