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

XGetWindowAttributes(x11_display, wd_parent.x11_window, &xwa);
		
		
		
		if (!wd_window.no_focus && !wd_window.is_popup && wd_window.focused) {
			if ((xwa.map_state == IsViewable) && !wd_parent.no_focus && !wd_window.is_popup) {
				XSetInputFocus(x11_display, wd_parent.x11_window, RevertToPointerRoot, CurrentTime);
			}
		}
	} else {
		ERR_FAIL_COND(!windows.has(p_parent));
		ERR_FAIL_COND_MSG(prev_parent != INVALID_WINDOW_ID, "Window already has a transient parent");
		WindowData &wd_parent = windows[p_parent];
		wd_window.transient_parent = p_parent;
		wd_parent.transient_children.insert(p_window);
		XSetTransientForHint(x11_display, wd_window.x11_window, wd_parent.x11_window);
	}
}
void DisplayServerX11::_update_size_hints(WindowID p_window) {
	WindowData &wd = windows[p_window];
	WindowMode window_mode = window_get_mode(p_window);
	XSizeHints *xsh = XAllocSizeHints();
	
	xsh->flags |= PPosition | PSize;
	xsh->x = wd.position.x;
	xsh->y = wd.position.y;
	xsh->width = wd.size.width;
	xsh->height = wd.size.height;
	if (window_mode == WINDOW_MODE_FULLSCREEN || window_mode == WINDOW_MODE_EXCLUSIVE_FULLSCREEN) {