### 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
}
	dynamic_state_create_info.dynamicStateCount = dynamic_states.size();
	dynamic_state_create_info.pDynamicStates = dynamic_states.ptr();
	void *graphics_pipeline_nextptr = nullptr;
	VkPipelineFragmentShadingRateStateCreateInfoKHR vrs_create_info;
	if (context->get_vrs_capabilities().attachment_vrs_supported) {
		
		
		
		vrs_create_info.sType = VK_STRUCTURE_TYPE_PIPELINE_FRAGMENT_SHADING_RATE_STATE_CREATE_INFO_KHR;
		vrs_create_info.pNext = nullptr;
		vrs_create_info.fragmentSize = { 4, 4 };
		vrs_create_info.combinerOps[0] = VK_FRAGMENT_SHADING_RATE_COMBINER_OP_KEEP_KHR; 
		vrs_create_info.combinerOps[1] = VK_FRAGMENT_SHADING_RATE_COMBINER_OP_REPLACE_KHR; 
		graphics_pipeline_nextptr = &vrs_create_info;
	}
	
	VkGraphicsPipelineCreateInfo graphics_pipeline_create_info;
	graphics_pipeline_create_info.sType = VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO;
	graphics_pipeline_create_info.pNext = graphics_pipeline_nextptr;
	graphics_pipeline_create_info.flags = 0;
	Vector<VkPipelineShaderStageCreateInfo> pipeline_stages = shader->pipeline_stages;
	Vector<VkSpecializationInfo> specialization_info;
	Vector<Vector<VkSpecializationMapEntry>> specialization_map_entries;
	Vector<uint32_t> specialization_constant_data;
	if (shader->specialization_constants.size()) {
		specialization_constant_data.resize(shader->specialization_constants.size());
		uint32_t *data_ptr = specialization_constant_data.ptrw();
		specialization_info.resize(pipeline_stages.size());
		specialization_map_entries.resize(pipeline_stages.size());