### 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
for (uint32_t i = 0; i < binary_data.specialization_constants_count; i++) {
		const RenderingDeviceVulkanShaderBinarySpecializationConstant &src_sc = *(reinterpret_cast<const RenderingDeviceVulkanShaderBinarySpecializationConstant *>(binptr + read_offset));
		Shader::SpecializationConstant sc;
		sc.constant.int_value = src_sc.int_value;
		sc.constant.type = PipelineSpecializationConstantType(src_sc.type);
		sc.constant.constant_id = src_sc.constant_id;
		sc.stage_flags = src_sc.stage_flags;
		specialization_constants.push_back(sc);
		read_offset += sizeof(RenderingDeviceVulkanShaderBinarySpecializationConstant);
	}
	Vector<Vector<uint8_t>> stage_spirv_data;
	Vector<ShaderStage> stage_type;
	for (uint32_t i = 0; i < binary_data.stage_count; i++) {
		ERR_FAIL_COND_V(read_offset + sizeof(uint32_t) * 3 >= binsize, RID());
		uint32_t stage = decode_uint32(binptr + read_offset);
		read_offset += sizeof(uint32_t);
		uint32_t smolv_size = decode_uint32(binptr + read_offset);
		read_offset += sizeof(uint32_t);
		uint32_t zstd_size = decode_uint32(binptr + read_offset);
		read_offset += sizeof(uint32_t);
		uint32_t buf_size = (zstd_size > 0) ? zstd_size : smolv_size;
		Vector<uint8_t> smolv;
		const uint8_t *src_smolv = nullptr;
		if (zstd_size > 0) {
			
			smolv.resize(smolv_size);
			int dec_smolv_size = Compression::decompress(smolv.ptrw(), smolv.size(), binptr + read_offset, zstd_size, Compression::MODE_ZSTD);
			ERR_FAIL_COND_V(dec_smolv_size != (int32_t)smolv_size, RID());
			src_smolv = smolv.ptr();
		} else {