### Godot version

master CI builds

### System information

Linux / Editor with doubles and GCC sanitizers

### Issue description

The `Linux / Editor with doubles and GCC sanitizers` build can fail with a `attempting free on address which was not malloc()-ed` crash in the `Open and close editor (Vulkan)` step.

https://github.com/godotengine/godot/actions/runs/5366302204/jobs/9735786296#step:15:138
https://github.com/godotengine/godot/actions/runs/5389199469/jobs/9783070708?pr=78740#step:15:138

The failure doesn't seem related to either PR (in fact one of them is just a docs change). I have only seen this issue these two times, still probably worth looking into.

### Steps to reproduce

Open and close https://github.com/godotengine/regression-test-project/archive/4.0.zip using the Vulkan renderer.

### Minimal reproduction project

https://github.com/godotengine/regression-test-project/archive/4.0.zip
switch (p_feature) {
		case SUPPORTS_MULTIVIEW: {
			VulkanContext::MultiviewCapabilities multiview_capabilies = context->get_multiview_capabilities();
			return multiview_capabilies.is_supported && multiview_capabilies.max_view_count > 1;
		} break;
		case SUPPORTS_FSR_HALF_FLOAT: {
			return context->get_shader_capabilities().shader_float16_is_supported && context->get_physical_device_features().shaderInt16 && context->get_storage_buffer_capabilities().storage_buffer_16_bit_access_is_supported;
		} break;
		case SUPPORTS_ATTACHMENT_VRS: {
			VulkanContext::VRSCapabilities vrs_capabilities = context->get_vrs_capabilities();
			return vrs_capabilities.attachment_vrs_supported && context->get_physical_device_features().shaderStorageImageExtendedFormats;
		} break;
		case SUPPORTS_FRAGMENT_SHADER_WITH_ONLY_SIDE_EFFECTS: {
			return true;
		} break;
		default: {
			return false;
		}
	}
}
RenderingDeviceVulkan::RenderingDeviceVulkan() {
	device_capabilities.device_family = DEVICE_VULKAN;
}
RenderingDeviceVulkan::~RenderingDeviceVulkan() {
	if (local_device.is_valid()) {
		finalize();
		context->local_device_free(local_device);
	}
}