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

*(cursor_image->pixels + index) = image->get_pixel(column_index, row_index).to_argb32();
		}
		ERR_FAIL_COND(cursor_image->pixels == nullptr);
		
		cursors[p_shape] = XcursorImageLoadCursor(x11_display, cursor_image);
		Vector<Variant> params;
		params.push_back(p_cursor);
		params.push_back(p_hotspot);
		cursors_cache.insert(p_shape, params);
		if (p_shape == current_cursor) {
			if (mouse_mode == MOUSE_MODE_VISIBLE || mouse_mode == MOUSE_MODE_CONFINED) {
				for (const KeyValue<WindowID, WindowData> &E : windows) {
					XDefineCursor(x11_display, E.value.x11_window, cursors[p_shape]);
				}
			}
		}
		memfree(cursor_image->pixels);
		XcursorImageDestroy(cursor_image);
	} else {
		
		if (img[p_shape]) {
			cursors[p_shape] = XcursorImageLoadCursor(x11_display, img[p_shape]);
		}
		CursorShape c = current_cursor;
		current_cursor = CURSOR_MAX;
		cursor_set_shape(c);
		cursors_cache.erase(p_shape);
	}
}
int DisplayServerX11::keyboard_get_layout_count() const {