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

return im_selection;
}
String DisplayServerX11::ime_get_text() const {
	return im_text;
}
void DisplayServerX11::cursor_set_shape(CursorShape p_shape) {
	_THREAD_SAFE_METHOD_
	ERR_FAIL_INDEX(p_shape, CURSOR_MAX);
	if (p_shape == current_cursor) {
		return;
	}
	if (mouse_mode == MOUSE_MODE_VISIBLE || mouse_mode == MOUSE_MODE_CONFINED) {
		if (cursors[p_shape] != None) {
			for (const KeyValue<WindowID, WindowData> &E : windows) {
				XDefineCursor(x11_display, E.value.x11_window, cursors[p_shape]);
			}
		} else if (cursors[CURSOR_ARROW] != None) {
			for (const KeyValue<WindowID, WindowData> &E : windows) {
				XDefineCursor(x11_display, E.value.x11_window, cursors[CURSOR_ARROW]);
			}
		}
	}
	current_cursor = p_shape;
}
DisplayServerX11::CursorShape DisplayServerX11::cursor_get_shape() const {