### Godot version

v4.0.beta17.mono.official [c40020513]

### System information

Windows 11 22H2

### Issue description

If the game window receives a mouse button down message but misses its corresponding button up message, `pressrc` will become permanently out of sync with the actual physical mouse state, and `ReleaseCapture()` will never be called.

https://github.com/godotengine/godot/blob/00302860541e9cccc59abd93b930af2a6e6ec360/platform/windows/display_server_windows.cpp#L3264-L3275

### Steps to reproduce

Run the MRP, click and hold the left mouse button in the main window, drag your cursor outside the window, then alt+tab to some non-Godot application, then release the mouse button.

Go back to the MRP windows, and observe that one window is completely unresponsive, and the other window can't be moved/resized/maximized/closed.

### Minimal reproduction project

[mouse_capture_bug.zip](https://github.com/godotengine/godot/files/10609122/mouse_capture_bug.zip)

if (!keysym.is_empty()) {
						key_label = fix_key_label(keysym[0], keycode);
					}
				}
				if (keycode != Key::SHIFT) {
					k->set_shift_pressed(ke.shift);
				}
				if (keycode != Key::ALT) {
					k->set_alt_pressed(ke.alt);
				}
				if (keycode != Key::CTRL) {
					k->set_ctrl_pressed(ke.control);
				}
				if (keycode != Key::META) {
					k->set_meta_pressed(ke.meta);
				}
				k->set_keycode(keycode);
				k->set_physical_keycode(physical_keycode);
				k->set_key_label(key_label);
				if (i + 1 < key_event_pos && key_event_buffer[i + 1].uMsg == WM_CHAR) {
					char32_t unicode = key_event_buffer[i + 1].wParam;
					static char32_t prev_wck = 0;
					if ((unicode & 0xfffffc00) == 0xd800) {
						if (prev_wck != 0) {
							ERR_PRINT("invalid utf16 surrogate input");
						}
						prev_wck = unicode;
						break; 
					} else if ((unicode & 0xfffffc00) == 0xdc00) {
						if (prev_wck == 0) {