### 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
render_pass_begin.renderArea.offset.y = 0;
	Vector<VkClearValue> clear_values;
	clear_values.resize(framebuffer->texture_ids.size());
	int clear_values_count = 0;
	{
		int color_index = 0;
		for (int i = 0; i < framebuffer->texture_ids.size(); i++) {
			VkClearValue clear_value;
			Texture *texture = texture_owner.get_or_null(framebuffer->texture_ids[i]);
			if (!texture) {
				color_index++;
				continue;
			}
			if (color_index < p_clear_colors.size() && texture->usage_flags & TEXTURE_USAGE_COLOR_ATTACHMENT_BIT) {
				ERR_FAIL_INDEX_V(color_index, p_clear_colors.size(), ERR_BUG); 
				Color clear_color = p_clear_colors[color_index];
				clear_value.color.float32[0] = clear_color.r;
				clear_value.color.float32[1] = clear_color.g;
				clear_value.color.float32[2] = clear_color.b;
				clear_value.color.float32[3] = clear_color.a;
				color_index++;
			} else if (texture->usage_flags & TEXTURE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT) {
				clear_value.depthStencil.depth = p_clear_depth;
				clear_value.depthStencil.stencil = p_clear_stencil;
			} else {
				clear_value.color.float32[0] = 0;
				clear_value.color.float32[1] = 0;
				clear_value.color.float32[2] = 0;
				clear_value.color.float32[3] = 0;
			}