### 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
framebuffer_create_info.height = p_framebuffer->size.height;
		framebuffer_create_info.layers = 1;
		VkResult err = vkCreateFramebuffer(device, &framebuffer_create_info, nullptr, &version.framebuffer);
		ERR_FAIL_COND_V_MSG(err, ERR_CANT_CREATE, "vkCreateFramebuffer failed with error " + itos(err) + ".");
		version.subpass_count = framebuffer_formats[p_framebuffer->format_id].E->key().passes.size();
		p_framebuffer->framebuffers.insert(vk, version);
	}
	const Framebuffer::Version &version = p_framebuffer->framebuffers[vk];
	*r_framebuffer = version.framebuffer;
	*r_render_pass = version.render_pass;
	*r_subpass_count = version.subpass_count;
	return OK;
}
Error RenderingDeviceVulkan::_draw_list_render_pass_begin(Framebuffer *framebuffer, InitialAction p_initial_color_action, FinalAction p_final_color_action, InitialAction p_initial_depth_action, FinalAction p_final_depth_action, const Vector<Color> &p_clear_colors, float p_clear_depth, uint32_t p_clear_stencil, Point2i viewport_offset, Point2i viewport_size, VkFramebuffer vkframebuffer, VkRenderPass render_pass, VkCommandBuffer command_buffer, VkSubpassContents subpass_contents, const Vector<RID> &p_storage_textures) {
	VkRenderPassBeginInfo render_pass_begin;
	render_pass_begin.sType = VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO;
	render_pass_begin.pNext = nullptr;
	render_pass_begin.renderPass = render_pass;
	render_pass_begin.framebuffer = vkframebuffer;
	/*
	 * Given how API works, it makes sense to always fully operate on the whole framebuffer.
	 * This allows better continue operations for operations like shadowmapping.
	render_pass_begin.renderArea.extent.width = viewport_size.width;
	render_pass_begin.renderArea.extent.height = viewport_size.height;
	render_pass_begin.renderArea.offset.x = viewport_offset.x;
	render_pass_begin.renderArea.offset.y = viewport_offset.y;
	*/
	render_pass_begin.renderArea.extent.width = framebuffer->size.width;
	render_pass_begin.renderArea.extent.height = framebuffer->size.height;
	render_pass_begin.renderArea.offset.x = 0;