### 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
WARN_PRINT("Invalid pipelines cache magic number.");
			return;
		}
		pipelines_cache.buffer.resize(file_data.size() - sizeof(PipelineCacheHeader));
		memcpy(pipelines_cache.buffer.ptrw(), file_data.ptr() + sizeof(PipelineCacheHeader), pipelines_cache.buffer.size());
		VkPhysicalDeviceProperties props;
		vkGetPhysicalDeviceProperties(context->get_physical_device(), &props);
		bool invalid_uuid = false;
		for (size_t i = 0; i < VK_UUID_SIZE; i++) {
			if (header.uuid[i] != props.pipelineCacheUUID[i]) {
				invalid_uuid = true;
				break;
			}
		}
		if (header.data_hash != hash_murmur3_buffer(pipelines_cache.buffer.ptr(), pipelines_cache.buffer.size()) || header.data_size != (uint32_t)pipelines_cache.buffer.size() || header.vendor_id != props.vendorID || header.device_id != props.deviceID || header.driver_abi != sizeof(void *) || invalid_uuid) {
			WARN_PRINT("Invalid pipelines cache header.");
			pipelines_cache.current_size = 0;
			pipelines_cache.buffer.clear();
		} else {
			pipelines_cache.current_size = pipelines_cache.buffer.size();
		}
	}
}
void RenderingDeviceVulkan::_update_pipeline_cache(bool p_closing) {
	size_t pso_blob_size = 0;
	float save_interval = GLOBAL_GET("rendering/rendering_device/pipeline_cache/save_chunk_size_mb");
	VkResult vr = vkGetPipelineCacheData(device, pipelines_cache.cache_object, &pso_blob_size, nullptr);
	ERR_FAIL_COND(vr);
	size_t difference = (pso_blob_size - pipelines_cache.current_size) / (1024 * 1024);
	if (p_closing && Engine::get_singleton()->is_editor_hint()) {