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

static unsigned char all_master_mask_data[XIMaskLen(XI_LASTEVENT)] = {};
		all_master_event_mask.deviceid = XIAllMasterDevices;
		all_master_event_mask.mask_len = sizeof(all_master_mask_data);
		all_master_event_mask.mask = all_master_mask_data;
		XISetMask(all_master_event_mask.mask, XI_DeviceChanged);
		XISetMask(all_master_event_mask.mask, XI_RawMotion);
		XISelectEvents(x11_display, DefaultRootWindow(x11_display), &all_master_event_mask, 1);
	}
	cursor_size = XcursorGetDefaultSize(x11_display);
	cursor_theme = XcursorGetTheme(x11_display);
	if (!cursor_theme) {
		print_verbose("XcursorGetTheme could not get cursor theme");
		cursor_theme = "default";
	}
	for (int i = 0; i < CURSOR_MAX; i++) {
		static const char *cursor_file[] = {
			"left_ptr",
			"xterm",
			"hand2",
			"cross",
			"watch",
			"left_ptr_watch",
			"fleur",
			"dnd-move",
			"crossed_circle",
			"v_double_arrow",
			"h_double_arrow",
			"size_bdiag",
			"size_fdiag",
			"move",