### Godot version

2992ffd25523cb8b3e0ef1b873c40115b8940178

### System information

Windows 10

### Issue description

Godot crashes randomly within a few seconds after project start when moving with the mouse.

![win_err](https://github.com/godotengine/godot/assets/52464204/1da28596-d95b-40f3-b32f-12219ec02c5d)

Started after recent merge of https://github.com/godotengine/godot/pull/67791.
I can confirm that reverting the pr fixes the crashes.

### Steps to reproduce

see desc

### Minimal reproduction project

N/A
Atom workarea_prop = XInternAtom(x11_display, "_NET_WORKAREA", True);
		if (workarea_prop != None) {
			unsigned long workarea_len = 0;
			unsigned char *workarea_data = nullptr;
			if (XGetWindowProperty(x11_display, x11_window, workarea_prop, 0, LONG_MAX, False, XA_CARDINAL, &type, &format, &workarea_len, &remaining, &workarea_data) == Success) {
				if ((format == 32) && (workarea_len >= ((desktop_index + 1) * 4)) && workarea_data) {
					long *rect_data = (long *)workarea_data;
					int data_offset = desktop_index * 4;
					Rect2i workarea_rect;
					workarea_rect.position.x = rect_data[data_offset];
					workarea_rect.position.y = rect_data[data_offset + 1];
					workarea_rect.size.x = rect_data[data_offset + 2];
					workarea_rect.size.y = rect_data[data_offset + 3];
					
					if (!is_multiscreen) {
						rect = workarea_rect;
					} else if (rect.intersects(workarea_rect)) {
						rect = rect.intersection(workarea_rect);
					}
				}
			}
			if (workarea_data) {
				XFree(workarea_data);
			}
		}
	}
	return rect;
}
int DisplayServerX11::screen_get_dpi(int p_screen) const {