### 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
_THREAD_SAFE_METHOD_
	ERR_FAIL_COND_V(!index_buffer_owner.owns(p_index_buffer), RID());
	IndexBuffer *index_buffer = index_buffer_owner.get_or_null(p_index_buffer);
	ERR_FAIL_COND_V(p_index_count == 0, RID());
	ERR_FAIL_COND_V(p_index_offset + p_index_count > index_buffer->index_count, RID());
	IndexArray index_array;
	index_array.max_index = index_buffer->max_index;
	index_array.buffer = index_buffer->buffer;
	index_array.offset = p_index_offset;
	index_array.indices = p_index_count;
	index_array.index_type = index_buffer->index_type;
	index_array.supports_restart_indices = index_buffer->supports_restart_indices;
	RID id = index_array_owner.make_rid(index_array);
	_add_dependency(id, p_index_buffer);
	return id;
}
static const char *shader_uniform_names[RenderingDevice::UNIFORM_TYPE_MAX] = {
	"Sampler", "CombinedSampler", "Texture", "Image", "TextureBuffer", "SamplerTextureBuffer", "ImageBuffer", "UniformBuffer", "StorageBuffer", "InputAttachment"
};
static VkShaderStageFlagBits shader_stage_masks[RenderingDevice::SHADER_STAGE_MAX] = {
	VK_SHADER_STAGE_VERTEX_BIT,
	VK_SHADER_STAGE_FRAGMENT_BIT,
	VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT,
	VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT,
	VK_SHADER_STAGE_COMPUTE_BIT,
};
String RenderingDeviceVulkan::_shader_uniform_debug(RID p_shader, int p_set) {