### Godot version

Latest 4.0.dev (a3a42159e31db27f8ae7c1ecad6a9ed417cb05de)

### System information

Ubuntu 22.04.1 LTS

### Issue description

Ctrl+Shift+F (Find in Files) in the text editor, for example, causes my laptop to freeze consistently. I also reproduced it with F1 and Ctrl+Shift+R, as well as by using the dropdown instead of shortcuts.

### Steps to reproduce

Trivial

### Minimal reproduction project

N/A
#if defined(GLES3_ENABLED)
	if (gl_manager) {
		gl_manager->window_make_current(p_window_id);
	}
#endif
}
void DisplayServerX11::window_set_current_screen(int p_screen, WindowID p_window) {
	_THREAD_SAFE_METHOD_
	ERR_FAIL_COND(!windows.has(p_window));
	WindowData &wd = windows[p_window];
	switch (p_screen) {
		case SCREEN_PRIMARY: {
			p_screen = get_primary_screen();
		} break;
		case SCREEN_OF_MAIN_WINDOW: {
			p_screen = window_get_current_screen(MAIN_WINDOW_ID);
		} break;
		default:
			break;
	}
	
	ERR_FAIL_INDEX(p_screen, get_screen_count());
	if (window_get_current_screen(p_window) == p_screen) {
		return;
	}
	if (window_get_mode(p_window) == WINDOW_MODE_FULLSCREEN) {
		Point2i position = screen_get_position(p_screen);
		Size2i size = screen_get_size(p_screen);
		XMoveResizeWindow(x11_display, wd.x11_window, position.x, position.y, size.x, size.y);
	} else {