### 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
1,
			 &color_reference,
			 nullptr,
			 nullptr,
			 0,
			 nullptr,
		};
		const VkRenderPassCreateInfo2KHR rp_info = {
			 VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO_2_KHR,
			 nullptr,
			 0,
			 1,
			 &attachment,
			 1,
			 &subpass,
			 0,
			 nullptr,
			 0,
			 nullptr,
		};
		err = vkCreateRenderPass2KHR(device, &rp_info, nullptr, &window->render_pass);
		ERR_FAIL_COND_V(err, ERR_CANT_CREATE);
		for (uint32_t i = 0; i < swapchainImageCount; i++) {
			const VkFramebufferCreateInfo fb_info = {
				 VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO,
				 nullptr,
				 0,
				 window->render_pass,
				 1,
				 &window->swapchain_image_resources[i].view,