### 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
vkCmdBindPipeline(cl->command_buffer, VK_PIPELINE_BIND_POINT_COMPUTE, pipeline->pipeline);
	if (cl->state.pipeline_shader != pipeline->shader) {
		
		
		uint32_t pcount = pipeline->set_formats.size(); 
		cl->state.set_count = MAX(cl->state.set_count, pcount);
		const uint32_t *pformats = pipeline->set_formats.ptr(); 
		bool sets_valid = true; 
		for (uint32_t i = 0; i < pcount; i++) {
			
			if (!sets_valid || cl->state.sets[i].pipeline_expected_format != pformats[i]) {
				cl->state.sets[i].bound = false;
				cl->state.sets[i].pipeline_expected_format = pformats[i];
				sets_valid = false;
			}
		}
		for (uint32_t i = pcount; i < cl->state.set_count; i++) {
			
			cl->state.sets[i].bound = false;
		}
		cl->state.set_count = pcount; 
		if (pipeline->push_constant_size) {
			cl->state.pipeline_push_constant_stages = pipeline->push_constant_stages_mask;
#ifdef DEBUG_ENABLED
			cl->validation.pipeline_push_constant_supplied = false;
#endif
		}
		cl->state.pipeline_shader = pipeline->shader;
		cl->state.local_group_size[0] = pipeline->local_group_size[0];
		cl->state.local_group_size[1] = pipeline->local_group_size[1];