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

}
			if (XGetICValues(wd.xic, XNFilterEvents, &im_event_mask, nullptr) != nullptr) {
				WARN_PRINT("XGetICValues couldn't obtain XNFilterEvents value");
				XDestroyIC(wd.xic);
				wd.xic = nullptr;
			}
			if (wd.xic) {
				XUnsetICFocus(wd.xic);
			} else {
				WARN_PRINT("XCreateIC couldn't create wd.xic");
			}
		} else {
			wd.xic = nullptr;
			WARN_PRINT("XCreateIC couldn't create wd.xic");
		}
		_update_context(wd);
		if (p_flags & WINDOW_FLAG_BORDERLESS_BIT) {
			Hints hints;
			Atom property;
			hints.flags = 2;
			hints.decorations = 0;
			property = XInternAtom(x11_display, "_MOTIF_WM_HINTS", True);
			if (property != None) {
				XChangeProperty(x11_display, wd.x11_window, property, property, 32, PropModeReplace, (unsigned char *)&hints, 5);
			}
		}
		if (wd.is_popup || wd.no_focus) {
			
			Atom type_atom = XInternAtom(x11_display, "_NET_WM_WINDOW_TYPE_UTILITY", False);
			Atom wt_atom = XInternAtom(x11_display, "_NET_WM_WINDOW_TYPE", False);