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

return mouse_mode;
}
void DisplayServerX11::warp_mouse(const Point2i &p_position) {
	_THREAD_SAFE_METHOD_
	if (mouse_mode == MOUSE_MODE_CAPTURED) {
		last_mouse_pos = p_position;
	} else {
		WindowID window_id = _get_focused_window_or_popup();
		if (!windows.has(window_id)) {
			window_id = MAIN_WINDOW_ID;
		}
		XWarpPointer(x11_display, None, windows[window_id].x11_window,
				0, 0, 0, 0, (int)p_position.x, (int)p_position.y);
	}
}
Point2i DisplayServerX11::mouse_get_position() const {