### 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
if (strut_partial_prop != None) {
								if (XGetWindowProperty(x11_display, windows_data[win_index], strut_partial_prop, 0, LONG_MAX, False, XA_CARDINAL, &type, &format, &strut_len, &remaining, &strut_data) == Success) {
									strut_found = true;
								}
							}
							
							if (!g_bad_window && !strut_found) {
								Atom strut_prop = XInternAtom(x11_display, "_NET_WM_STRUT", True);
								if (strut_prop != None) {
									if (XGetWindowProperty(x11_display, windows_data[win_index], strut_prop, 0, LONG_MAX, False, XA_CARDINAL, &type, &format, &strut_len, &remaining, &strut_data) == Success) {
										strut_found = true;
									}
								}
							}
							if (!g_bad_window && strut_found && (format == 32) && (strut_len >= 4) && strut_data) {
								long *struts = (long *)strut_data;
								long left = struts[0];
								long right = struts[1];
								long top = struts[2];
								long bottom = struts[3];
								long left_start_y, left_end_y, right_start_y, right_end_y;
								long top_start_x, top_end_x, bottom_start_x, bottom_end_x;
								if (strut_len >= 12) {
									left_start_y = struts[4];
									left_end_y = struts[5];
									right_start_y = struts[6];
									right_end_y = struts[7];
									top_start_x = struts[8];
									top_end_x = struts[9];
									bottom_start_x = struts[10];