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

ERR_FAIL_COND_V(!windows.has(p_window), 0);
	switch (p_handle_type) {
		case DISPLAY_HANDLE: {
			return (int64_t)x11_display;
		}
		case WINDOW_HANDLE: {
			return (int64_t)windows[p_window].x11_window;
		}
		case WINDOW_VIEW: {
			return 0; 
		}
#ifdef GLES3_ENABLED
		case OPENGL_CONTEXT: {
			if (gl_manager) {
				return (int64_t)gl_manager->get_glx_context(p_window);
			}
			return 0;
		}
#endif
		default: {
			return 0;
		}
	}
}
void DisplayServerX11::window_attach_instance_id(ObjectID p_instance, WindowID p_window) {
	ERR_FAIL_COND(!windows.has(p_window));
	WindowData &wd = windows[p_window];
	wd.instance_id = p_instance;
}
ObjectID DisplayServerX11::window_get_attached_instance_id(WindowID p_window) const {