### Godot version

v4.0.beta15.mono.official [4fa6edc88]

### System information

Linux, Xorg

### Issue description

The entire window loses focus if you ungrab focus from a Control. 
This doesn't seem to happen in Beta 14 and older betas.

### Steps to reproduce

1. Create a Control that can grab focus (tested with LineEdit and TextEdit)
2. Grab focus
3. Release focus via release_focus() or hiding the node

### Minimal reproduction project

[FocusMinimal.zip](https://github.com/godotengine/godot/files/10498175/FocusMinimal.zip)

}
		} else {
			time_since_no_focus = OS::get_singleton()->get_ticks_msec();
		}
	}
	do_mouse_warp = false;
	
	bool mouse_mode_grab = mouse_mode == MOUSE_MODE_CAPTURED || mouse_mode == MOUSE_MODE_CONFINED || mouse_mode == MOUSE_MODE_CONFINED_HIDDEN;
	xi.pressure = 0;
	xi.tilt = Vector2();
	xi.pressure_supported = false;
	LocalVector<XEvent> events;
	{
		
		MutexLock mutex_lock(events_mutex);
		events = polled_events;
		polled_events.clear();
		
		_check_pending_events(events);
	}
	for (uint32_t event_index = 0; event_index < events.size(); ++event_index) {
		XEvent &event = events[event_index];
		if (ignore_events) {
			XFreeEventData(x11_display, &event.xcookie);
			continue;
		}
		bool ime_window_event = false;
		WindowID window_id = MAIN_WINDOW_ID;
		
		for (const KeyValue<WindowID, WindowData> &E : windows) {