### 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 (event->xany.window == *(Window *)arg) {
		return (event->type == SelectionRequest) ||
				(event->type == SelectionNotify);
	} else {
		return False;
	}
}
void DisplayServerX11::_clipboard_transfer_ownership(Atom p_source, Window x11_window) const {
	_THREAD_SAFE_METHOD_
	Window selection_owner = XGetSelectionOwner(x11_display, p_source);
	if (selection_owner != x11_window) {
		return;
	}
	
	MutexLock mutex_lock(events_mutex);
	Atom clipboard_manager = XInternAtom(x11_display, "CLIPBOARD_MANAGER", False);
	Atom save_targets = XInternAtom(x11_display, "SAVE_TARGETS", False);
	XConvertSelection(x11_display, clipboard_manager, save_targets, None,
			x11_window, CurrentTime);
	
	while (true) {
		if (!_wait_for_events()) {
			
			break;
		}
		
		XEvent ev;