### Godot version

 Latest 4.0.dev (a3a42159e31db27f8ae7c1ecad6a9ed417cb05de)

### System information

Ubuntu 22.04.1 LTS

### Issue description

![image](https://user-images.githubusercontent.com/85438892/214476911-0ce83a43-b959-4b13-88fd-d6b9af0cd63a.png)

### Steps to reproduce

Open any script

### Minimal reproduction project

N/A
r_error = ERR_UNAVAILABLE;
		ERR_FAIL_MSG("Can't load Xinerama dynamically.");
	}
	if (initialize_xrandr(dylibloader_verbose) != 0) {
		r_error = ERR_UNAVAILABLE;
		ERR_FAIL_MSG("Can't load Xrandr dynamically.");
	}
	if (initialize_xrender(dylibloader_verbose) != 0) {
		r_error = ERR_UNAVAILABLE;
		ERR_FAIL_MSG("Can't load Xrender dynamically.");
	}
	if (initialize_xinput2(dylibloader_verbose) != 0) {
		r_error = ERR_UNAVAILABLE;
		ERR_FAIL_MSG("Can't load Xinput2 dynamically.");
	}
	Input::get_singleton()->set_event_dispatch_function(_dispatch_input_events);
	r_error = OK;
	for (int i = 0; i < CURSOR_MAX; i++) {
		cursors[i] = None;
		img[i] = nullptr;
	}
	XInitThreads(); 
	
	x11_display = XOpenDisplay(nullptr);
	if (!x11_display) {
		ERR_PRINT("X11 Display is not available");
		r_error = ERR_UNAVAILABLE;
		return;
	}
	char *modifiers = nullptr;