### 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
VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO,
				 nullptr,
				 VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT,
				 nullptr,
			};
			err = vkBeginCommandBuffer(window->swapchain_image_resources[i].graphics_to_present_cmd, &cmd_buf_info);
			ERR_FAIL_COND_V(err, ERR_CANT_CREATE);
			VkImageMemoryBarrier image_ownership_barrier = {
				 VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER,
				 nullptr,
				 0,
				 VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT,
				 VK_IMAGE_LAYOUT_PRESENT_SRC_KHR,
				 VK_IMAGE_LAYOUT_PRESENT_SRC_KHR,
				 graphics_queue_family_index,
				 present_queue_family_index,
				 window->swapchain_image_resources[i].image,
				 { VK_IMAGE_ASPECT_COLOR_BIT, 0, 1, 0, 1 }
			};
			vkCmdPipelineBarrier(window->swapchain_image_resources[i].graphics_to_present_cmd, VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT,
					VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT, 0, 0, nullptr, 0, nullptr, 1, &image_ownership_barrier);
			err = vkEndCommandBuffer(window->swapchain_image_resources[i].graphics_to_present_cmd);
			ERR_FAIL_COND_V(err, ERR_CANT_CREATE);
		}
	}
	
	window->current_buffer = 0;
	return OK;
}
Error VulkanContext::initialize() {