### Godot version

v4.0.3.stable.official [5222a99f5]

### System information

Windows 11, AMD Ryzen 5 3500U with Radeon Vega Mobile Gfx     2.10 GHz

### Issue description

  The editor crashes when it is minimised if it isn't the foreground window, eg. via Windows key + M.  This didn't occur in 4.0.2, but is now occurring in 4.0.3. I'll just mention that /interface/editor/save_on_focus_loss is false because another issue mentions something like this but with that property set to true.

### Steps to reproduce

N/A

### Minimal reproduction project

N/A
break;
			case DisplayServer::VSYNC_DISABLED:
				present_mode_string = "Disabled";
				break;
		}
		WARN_PRINT(vformat("The requested V-Sync mode %s is not available. Falling back to V-Sync mode Enabled.", present_mode_string));
		window->vsync_mode = DisplayServer::VSYNC_ENABLED; 
	}
	free(presentModes);
	
	
	
	uint32_t desiredNumOfSwapchainImages = 3;
	if (desiredNumOfSwapchainImages < surfCapabilities.minImageCount) {
		desiredNumOfSwapchainImages = surfCapabilities.minImageCount;
	}
	
	
	if ((surfCapabilities.maxImageCount > 0) && (desiredNumOfSwapchainImages > surfCapabilities.maxImageCount)) {
		
		desiredNumOfSwapchainImages = surfCapabilities.maxImageCount;
	}
	VkSurfaceTransformFlagsKHR preTransform;
	if (surfCapabilities.supportedTransforms & VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR) {
		preTransform = VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR;
	} else {
		preTransform = surfCapabilities.currentTransform;
	}
	VkCompositeAlphaFlagBitsKHR compositeAlpha = VK_COMPOSITE_ALPHA_OPAQUE_BIT_KHR;
	if (OS::get_singleton()->is_layered_allowed() || !(surfCapabilities.supportedCompositeAlpha & compositeAlpha)) {