### 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
KeyMappingWindows::initialize();
	drop_events = false;
	key_event_pos = 0;
	alt_mem = false;
	gr_mem = false;
	shift_mem = false;
	control_mem = false;
	meta_mem = false;
	hInstance = static_cast<OS_Windows *>(OS::get_singleton())->get_hinstance();
	pressrc = 0;
	old_invalid = true;
	mouse_mode = MOUSE_MODE_VISIBLE;
	rendering_driver = p_rendering_driver;
	
	bool tts_enabled = GLOBAL_GET("audio/general/text_to_speech");
	if (tts_enabled) {
		tts = memnew(TTS_Windows);
	}
	
	screen_set_keep_on(GLOBAL_GET("display/window/energy_saving/keep_screen_on"));
	
	OSVERSIONINFOW os_ver;
	ZeroMemory(&os_ver, sizeof(OSVERSIONINFOW));
	os_ver.dwOSVersionInfoSize = sizeof(OSVERSIONINFOW);
	HMODULE nt_lib = LoadLibraryW(L"ntdll.dll");
	if (nt_lib) {
		RtlGetVersionPtr RtlGetVersion = (RtlGetVersionPtr)GetProcAddress(nt_lib, "RtlGetVersion");
		if (RtlGetVersion) {
			RtlGetVersion(&os_ver);
		}