### 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 (type_selected < 1) {
							type_selected = 1;
							device_index = i;
						}
					} break;
					default: {
						if (type_selected < 0) {
							type_selected = 0;
							device_index = i;
						}
					} break;
				}
			}
		}
		int32_t user_device_index = Engine::get_singleton()->get_gpu_index(); 
		if (user_device_index >= 0 && user_device_index < (int32_t)gpu_count) {
			device_index = user_device_index;
		}
		ERR_FAIL_COND_V_MSG(device_index == -1, ERR_CANT_CREATE, "None of Vulkan devices supports both graphics and present queues.");
		gpu = physical_devices[device_index];
	}
	free(physical_devices);
	
	vkGetPhysicalDeviceProperties(gpu, &gpu_props);
	device_name = gpu_props.deviceName;
	device_type = gpu_props.deviceType;
	pipeline_cache_id = String::hex_encode_buffer(gpu_props.pipelineCacheUUID, VK_UUID_SIZE);
	pipeline_cache_id += "-driver-" + itos(gpu_props.driverVersion);
	{
		device_vendor = "Unknown";