### 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)

ERR_FAIL_INDEX_V(p_screen, get_screen_count(), Ref<Image>());
	switch (p_screen) {
		case SCREEN_PRIMARY: {
			p_screen = get_primary_screen();
		} break;
		case SCREEN_OF_MAIN_WINDOW: {
			p_screen = window_get_current_screen(MAIN_WINDOW_ID);
		} break;
		default:
			break;
	}
	Point2i pos = screen_get_position(p_screen) + _get_screens_origin();
	Size2i size = screen_get_size(p_screen);
	POINT p1;
	p1.x = pos.x;
	p1.y = pos.y;
	POINT p2;
	p2.x = pos.x + size.x;
	p2.y = pos.y + size.y;
	if (win81p_LogicalToPhysicalPointForPerMonitorDPI) {
		win81p_LogicalToPhysicalPointForPerMonitorDPI(0, &p1);
		win81p_LogicalToPhysicalPointForPerMonitorDPI(0, &p2);
	}
	Ref<Image> img;
	HDC dc = GetDC(0);
	if (dc) {
		HDC hdc = CreateCompatibleDC(dc);
		int width = p2.x - p1.x;