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

Atom actual_type = None;
	int actual_format = 0;
	unsigned long nitems = 0;
	unsigned long bytes_after = 0;
	unsigned char *ret = nullptr;
	
	if (p_property != None) {
		int read_bytes = 1024;
		do {
			if (ret != nullptr) {
				XFree(ret);
			}
			XGetWindowProperty(p_display, p_window, p_property, 0, read_bytes, False, AnyPropertyType,
					&actual_type, &actual_format, &nitems, &bytes_after,
					&ret);
			read_bytes *= 2;
		} while (bytes_after != 0);
	}
	Property p = { ret, actual_format, (int)nitems, actual_type };
	return p;
}
static Atom pick_target_from_list(Display *p_display, const Atom *p_list, int p_count) {