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

window_id_other = E.key;
									wd_other_x11_window = E.value.x11_window;
								}
								break;
							}
						}
					}
					if (window_id_other != INVALID_WINDOW_ID) {
						int x, y;
						Window child;
						XTranslateCoordinates(x11_display, wd.x11_window, wd_other_x11_window, event.xbutton.x, event.xbutton.y, &x, &y, &child);
						mb->set_window_id(window_id_other);
						mb->set_position(Vector2(x, y));
						mb->set_global_position(mb->get_position());
					}
				}
				Input::get_singleton()->parse_input_event(mb);
			} break;
			case MotionNotify: {
				if (ime_window_event) {
					break;
				}
				
				
				
				WindowID focused_window_id = _get_focused_window_or_popup();
				if (!windows.has(focused_window_id)) {
					focused_window_id = MAIN_WINDOW_ID;
				}
				while (true) {