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

case Expose: {
				DEBUG_LOG_X11("[%u] Expose window=%lu (%u), count='%u' \n", frame, event.xexpose.window, window_id, event.xexpose.count);
				if (ime_window_event) {
					break;
				}
				windows[window_id].fullscreen = _window_fullscreen_check(window_id);
				Main::force_redraw();
			} break;
			case NoExpose: {
				DEBUG_LOG_X11("[%u] NoExpose drawable=%lu (%u) \n", frame, event.xnoexpose.drawable, window_id);
				if (ime_window_event) {
					break;
				}
				windows[window_id].minimized = true;
			} break;
			case VisibilityNotify: {
				DEBUG_LOG_X11("[%u] VisibilityNotify window=%lu (%u), state=%u \n", frame, event.xvisibility.window, window_id, event.xvisibility.state);
				if (ime_window_event) {
					break;
				}
				windows[window_id].minimized = _window_minimize_check(window_id);
			} break;
			case LeaveNotify: {
				DEBUG_LOG_X11("[%u] LeaveNotify window=%lu (%u), mode='%u' \n", frame, event.xcrossing.window, window_id, event.xcrossing.mode);
				if (ime_window_event) {
					break;
				}
				if (!mouse_mode_grab) {
					_send_window_event(windows[window_id], WINDOW_EVENT_MOUSE_EXIT);
				}