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

r_error = ERR_UNAVAILABLE;
		ERR_FAIL_MSG("Can't load Xinerama dynamically.");
	}
	if (initialize_xrandr(dylibloader_verbose) != 0) {
		r_error = ERR_UNAVAILABLE;
		ERR_FAIL_MSG("Can't load Xrandr dynamically.");
	}
	if (initialize_xrender(dylibloader_verbose) != 0) {
		r_error = ERR_UNAVAILABLE;
		ERR_FAIL_MSG("Can't load Xrender dynamically.");
	}
	if (initialize_xinput2(dylibloader_verbose) != 0) {
		r_error = ERR_UNAVAILABLE;
		ERR_FAIL_MSG("Can't load Xinput2 dynamically.");
	}
	Input::get_singleton()->set_event_dispatch_function(_dispatch_input_events);
	r_error = OK;
	for (int i = 0; i < CURSOR_MAX; i++) {
		cursors[i] = None;
		img[i] = nullptr;
	}
	XInitThreads(); 
	
	x11_display = XOpenDisplay(nullptr);
	if (!x11_display) {
		ERR_PRINT("X11 Display is not available");
		r_error = ERR_UNAVAILABLE;
		return;
	}
	char *modifiers = nullptr;