### 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
if (is_device_extension_enabled(VK_KHR_CREATE_RENDERPASS_2_EXTENSION_NAME)) {
		if (fpCreateRenderPass2KHR == nullptr) {
			fpCreateRenderPass2KHR = (PFN_vkCreateRenderPass2KHR)vkGetDeviceProcAddr(p_device, "vkCreateRenderPass2KHR");
		}
		if (fpCreateRenderPass2KHR == nullptr) {
			return VK_ERROR_EXTENSION_NOT_PRESENT;
		} else {
			return (fpCreateRenderPass2KHR)(p_device, p_create_info, p_allocator, p_render_pass);
		}
	} else {
		
		const void *next = p_create_info->pNext; 
		Vector<VkAttachmentDescription> attachments;
		for (uint32_t i = 0; i < p_create_info->attachmentCount; i++) {
			
			VkAttachmentDescription att = {
				p_create_info->pAttachments[i].flags, 
				p_create_info->pAttachments[i].format, 
				p_create_info->pAttachments[i].samples, 
				p_create_info->pAttachments[i].loadOp, 
				p_create_info->pAttachments[i].storeOp, 
				p_create_info->pAttachments[i].stencilLoadOp, 
				p_create_info->pAttachments[i].stencilStoreOp, 
				p_create_info->pAttachments[i].initialLayout, 
				p_create_info->pAttachments[i].finalLayout 
			};
			attachments.push_back(att);
		}