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

new_rect.position.x = x;
		new_rect.position.y = y;
		new_rect.size.width = event->xconfigure.width;
		new_rect.size.height = event->xconfigure.height;
	}
	if (new_rect == Rect2i(wd.position, wd.size)) {
		return;
	}
	wd.position = new_rect.position;
	wd.size = new_rect.size;
#if defined(VULKAN_ENABLED)
	if (context_vulkan) {
		context_vulkan->window_resize(window_id, wd.size.width, wd.size.height);
	}
#endif
#if defined(GLES3_ENABLED)
	if (gl_manager) {
		gl_manager->window_resize(window_id, wd.size.width, wd.size.height);
	}
#endif
	if (!wd.rect_changed_callback.is_null()) {
		Rect2i r = new_rect;
		Variant rect = r;
		Variant *rectp = &rect;
		Variant ret;
		Callable::CallError ce;
		wd.rect_changed_callback.callp((const Variant **)&rectp, 1, ret, ce);
	}
}
DisplayServer::WindowID DisplayServerX11::_get_focused_window_or_popup() const {