### 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
}
#endif
				last_timestamp = event.xkey.time;
				
				
				_handle_key_event(window_id, &event.xkey, events, event_index);
			} break;
			case SelectionNotify:
				if (ime_window_event) {
					break;
				}
				if (event.xselection.target == requested) {
					Property p = _read_property(x11_display, windows[window_id].x11_window, XInternAtom(x11_display, "PRIMARY", 0));
					Vector<String> files = String((char *)p.data).split("\r\n", false);
					XFree(p.data);
					for (int i = 0; i < files.size(); i++) {
						files.write[i] = files[i].replace("file:", "").uri_decode();
					}
					if (!windows[window_id].drop_files_callback.is_null()) {
						Variant v = files;
						Variant *vp = &v;
						Variant ret;
						Callable::CallError ce;
						windows[window_id].drop_files_callback.callp((const Variant **)&vp, 1, ret, ce);
					}
					
					XClientMessageEvent m;
					memset(&m, 0, sizeof(m));
					m.type = ClientMessage;
					m.display = x11_display;