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

DisplayServerX11 *display_server = static_cast<DisplayServerX11 *>(ud);
	display_server->_poll_events();
}
Bool DisplayServerX11::_predicate_all_events(Display *display, XEvent *event, XPointer arg) {
	
	return True;
}
bool DisplayServerX11::_wait_for_events() const {
	int x11_fd = ConnectionNumber(x11_display);
	fd_set in_fds;
	XFlush(x11_display);
	FD_ZERO(&in_fds);
	FD_SET(x11_fd, &in_fds);
	struct timeval tv;
	tv.tv_usec = 0;
	tv.tv_sec = 1;
	
	int num_ready_fds = select(x11_fd + 1, &in_fds, nullptr, nullptr, &tv);
	if (num_ready_fds > 0) {
		
		return true;
	} else {
		
		if (num_ready_fds < 0) {
			ERR_PRINT("_wait_for_events: select error: " + itos(errno));
		}
		return false;
	}
}
void DisplayServerX11::_poll_events() {