### 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
_THREAD_SAFE_METHOD_
	if (!p_text.is_empty()) {
		{
			
			MutexLock mutex_lock(events_mutex);
			internal_clipboard_primary = p_text;
		}
		XSetSelectionOwner(x11_display, XA_PRIMARY, windows[MAIN_WINDOW_ID].x11_window, CurrentTime);
		XSetSelectionOwner(x11_display, XInternAtom(x11_display, "PRIMARY", 0), windows[MAIN_WINDOW_ID].x11_window, CurrentTime);
	}
}
Bool DisplayServerX11::_predicate_clipboard_selection(Display *display, XEvent *event, XPointer arg) {
	if (event->type == SelectionNotify && event->xselection.requestor == *(Window *)arg) {
		return True;
	} else {
		return False;
	}
}
Bool DisplayServerX11::_predicate_clipboard_incr(Display *display, XEvent *event, XPointer arg) {
	if (event->type == PropertyNotify && event->xproperty.state == PropertyNewValue) {
		return True;
	} else {
		return False;
	}
}
String DisplayServerX11::_clipboard_get_impl(Atom p_source, Window x11_window, Atom target) const {