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

_THREAD_SAFE_METHOD_
	return _screen_get_rect(p_screen).position;
}
Size2i DisplayServerX11::screen_get_size(int p_screen) const {
	_THREAD_SAFE_METHOD_
	return _screen_get_rect(p_screen).size;
}
bool g_bad_window = false;
int bad_window_error_handler(Display *display, XErrorEvent *error) {
	if (error->error_code == BadWindow) {
		g_bad_window = true;
	} else {
		ERR_PRINT("Unhandled XServer error code: " + itos(error->error_code));
	}
	return 0;
}
Rect2i DisplayServerX11::screen_get_usable_rect(int p_screen) const {
	_THREAD_SAFE_METHOD_