### 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
char gtk_workarea_prop_name[32];
			snprintf(gtk_workarea_prop_name, 32, "_GTK_WORKAREAS_D%d", desktop_index);
			Atom gtk_workarea_prop = XInternAtom(x11_display, gtk_workarea_prop_name, True);
			if (gtk_workarea_prop != None) {
				unsigned long workarea_len = 0;
				unsigned char *workarea_data = nullptr;
				if (XGetWindowProperty(x11_display, x11_window, gtk_workarea_prop, 0, LONG_MAX, False, XA_CARDINAL, &type, &format, &workarea_len, &remaining, &workarea_data) == Success) {
					if ((format == 32) && (workarea_len % 4 == 0) && workarea_data) {
						long *rect_data = (long *)workarea_data;
						for (uint32_t data_offset = 0; data_offset < workarea_len; data_offset += 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 (rect.grow(-1).intersects(workarea_rect)) {
								rect = rect.intersection(workarea_rect);
								XFree(workarea_data);
								return rect;
							}
						}
					}
				}
				if (workarea_data) {
					XFree(workarea_data);
				}
			}
		}