### 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
ERR_FAIL_COND_V(windows.has(p_window_id), ERR_INVALID_PARAMETER);
	if (!device_initialized) {
		Error err = _create_physical_device(p_surface);
		ERR_FAIL_COND_V(err != OK, ERR_CANT_CREATE);
	}
	if (!queues_initialized) {
		
		
		
		Error err = _initialize_queues(p_surface);
		ERR_FAIL_COND_V(err != OK, ERR_CANT_CREATE);
	}
	Window window;
	window.surface = p_surface;
	window.width = p_width;
	window.height = p_height;
	window.vsync_mode = p_vsync_mode;
	Error err = _update_swap_chain(&window);
	ERR_FAIL_COND_V(err != OK, ERR_CANT_CREATE);
	VkSemaphoreCreateInfo semaphoreCreateInfo = {
		 VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO,