### 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
src_smolv = binptr + read_offset;
		}
		Vector<uint8_t> spirv;
		uint32_t spirv_size = smolv::GetDecodedBufferSize(src_smolv, smolv_size);
		spirv.resize(spirv_size);
		if (!smolv::Decode(src_smolv, smolv_size, spirv.ptrw(), spirv_size)) {
			ERR_FAIL_V_MSG(RID(), "Malformed smolv input uncompressing shader stage:" + String(shader_stage_names[stage]));
		}
		stage_spirv_data.push_back(spirv);
		stage_type.push_back(ShaderStage(stage));
		if (buf_size % 4 != 0) {
			buf_size += 4 - (buf_size % 4);
		}
		ERR_FAIL_COND_V(read_offset + buf_size > binsize, RID());
		read_offset += buf_size;
	}
	ERR_FAIL_COND_V(read_offset != binsize, RID());
	
	_THREAD_SAFE_METHOD_
	RID id;
	if (p_placeholder.is_null()) {
		id = shader_owner.make_rid();
	} else {
		id = p_placeholder;
	}
	Shader *shader = shader_owner.get_or_null(id);
	shader->vertex_input_mask = vertex_input_mask;
	shader->fragment_output_mask = fragment_output_mask;
	shader->push_constant = push_constant;
	shader->is_compute = is_compute;