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

bi.bV5Compression = BI_BITFIELDS;
		bi.bV5RedMask = 0x00ff0000;
		bi.bV5GreenMask = 0x0000ff00;
		bi.bV5BlueMask = 0x000000ff;
		bi.bV5AlphaMask = 0xff000000;
		HDC dc = GetDC(nullptr);
		HBITMAP bitmap = CreateDIBSection(dc, reinterpret_cast<BITMAPINFO *>(&bi), DIB_RGB_COLORS, reinterpret_cast<void **>(&buffer), nullptr, 0);
		HBITMAP mask = CreateBitmap(texture_size.width, texture_size.height, 1, 1, nullptr);
		bool fully_transparent = true;
		for (UINT index = 0; index < image_size; index++) {
			int row_index = floor(index / texture_size.width) + atlas_rect.position.y;
			int column_index = (index % int(texture_size.width)) + atlas_rect.position.x;
			if (atlas_texture.is_valid()) {
				column_index = MIN(column_index, atlas_rect.size.width - 1);
				row_index = MIN(row_index, atlas_rect.size.height - 1);
			}
			const Color &c = image->get_pixel(column_index, row_index);
			fully_transparent = fully_transparent && (c.a == 0.f);
			*(buffer + index) = c.to_argb32();
		}
		
		if (cursors[p_shape]) {
			DestroyIcon(cursors[p_shape]);
		}
		if (fully_transparent) {
			cursors[p_shape] = nullptr;
		} else {
			ICONINFO iconinfo;
			iconinfo.fIcon = FALSE;
			iconinfo.xHotspot = p_hotspot.x;