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

XVisualInfo visualInfo;
	bool vi_selected = false;
#ifdef GLES3_ENABLED
	if (gl_manager) {
		visualInfo = gl_manager->get_vi(x11_display);
		vi_selected = true;
	}
#endif
	if (!vi_selected) {
		long visualMask = VisualScreenMask;
		int numberOfVisuals;
		XVisualInfo vInfoTemplate = {};
		vInfoTemplate.screen = DefaultScreen(x11_display);
		XVisualInfo *vi_list = XGetVisualInfo(x11_display, visualMask, &vInfoTemplate, &numberOfVisuals);
		ERR_FAIL_COND_V(!vi_list, INVALID_WINDOW_ID);
		visualInfo = vi_list[0];
		if (OS::get_singleton()->is_layered_allowed()) {
			for (int i = 0; i < numberOfVisuals; i++) {
				XRenderPictFormat *pict_format = XRenderFindVisualFormat(x11_display, vi_list[i].visual);
				if (!pict_format) {
					continue;
				}
				visualInfo = vi_list[i];
				if (pict_format->direct.alphaMask > 0) {
					break;