### 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
Color clear_color = p_clear_colors[texture_index++];
			clear_at.clearValue.color.float32[0] = clear_color.r;
			clear_at.clearValue.color.float32[1] = clear_color.g;
			clear_at.clearValue.color.float32[2] = clear_color.b;
			clear_at.clearValue.color.float32[3] = clear_color.a;
			clear_at.colorAttachment = color_index++;
			clear_at.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT;
		} else if (p_clear_depth && texture->usage_flags & TEXTURE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT) {
			clear_at.clearValue.depthStencil.depth = p_depth;
			clear_at.clearValue.depthStencil.stencil = p_stencil;
			clear_at.colorAttachment = 0;
			clear_at.aspectMask = VK_IMAGE_ASPECT_DEPTH_BIT;
			if (format_has_stencil(texture->format)) {
				clear_at.aspectMask |= VK_IMAGE_ASPECT_STENCIL_BIT;
			}
		} else {
			ERR_CONTINUE(true);
		}
		clear_attachments.push_back(clear_at);
	}
	VkClearRect cr;
	cr.baseArrayLayer = 0;
	cr.layerCount = 1;
	cr.rect.offset.x = p_viewport_offset.x;
	cr.rect.offset.y = p_viewport_offset.y;
	cr.rect.extent.width = p_viewport_size.width;
	cr.rect.extent.height = p_viewport_size.height;
	vkCmdClearAttachments(p_draw_list->command_buffer, clear_attachments.size(), clear_attachments.ptr(), 1, &cr);
}
RenderingDevice::DrawListID RenderingDeviceVulkan::draw_list_begin(RID p_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_color_values, float p_clear_depth, uint32_t p_clear_stencil, const Rect2 &p_region, const Vector<RID> &p_storage_textures) {