### 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
command_buffer_queue.write[0] = p_command_buffer;
}
void VulkanContext::append_command_buffer(VkCommandBuffer p_command_buffer) {
	if (command_buffer_queue.size() <= command_buffer_count) {
		command_buffer_queue.resize(command_buffer_count + 1);
	}
	command_buffer_queue.write[command_buffer_count] = p_command_buffer;
	command_buffer_count++;
}
void VulkanContext::flush(bool p_flush_setup, bool p_flush_pending) {
	
	vkDeviceWaitIdle(device);
	
	bool setup_flushable = p_flush_setup && command_buffer_queue[0];
	bool pending_flushable = p_flush_pending && command_buffer_count > 1;
	if (setup_flushable) {
		
		VkSubmitInfo submit_info;
		submit_info.sType = VK_STRUCTURE_TYPE_SUBMIT_INFO;
		submit_info.pNext = nullptr;
		submit_info.pWaitDstStageMask = nullptr;