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

0, 0, 
				0, 
				AnyPropertyType, 
				&type, 
				&format, 
				&len, &bytes_left, 
				&data);
		if (data) {
			XFree(data);
		}
		if (type == XInternAtom(x11_display, "INCR", 0)) {
			
			DEBUG_LOG_X11("INCR selection started.\n");
			LocalVector<uint8_t> incr_data;
			uint32_t data_size = 0;
			bool success = false;
			
			XDeleteProperty(x11_display, x11_window, type);
			
			bool done = false;
			while (!done) {
				if (!_wait_for_events()) {
					
					break;
				}
				
				XEvent ev;
				while (XCheckIfEvent(x11_display, &ev, _predicate_clipboard_incr, nullptr)) {
					result = XGetWindowProperty(x11_display, x11_window,
							selection,