### 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
}
			if (texture.usage_flags & TEXTURE_USAGE_INPUT_ATTACHMENT_BIT) {
				usage_info.usage |= VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT;
			}
			if (texture.usage_flags & TEXTURE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT) {
				usage_info.usage |= VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT;
			}
			if (texture.usage_flags & TEXTURE_USAGE_CAN_UPDATE_BIT) {
				usage_info.usage |= VK_IMAGE_USAGE_TRANSFER_DST_BIT;
			}
			if (texture.usage_flags & TEXTURE_USAGE_CAN_COPY_FROM_BIT) {
				usage_info.usage |= VK_IMAGE_USAGE_TRANSFER_SRC_BIT;
			}
			if (texture.usage_flags & TEXTURE_USAGE_CAN_COPY_TO_BIT) {
				usage_info.usage |= VK_IMAGE_USAGE_TRANSFER_DST_BIT;
			}
			image_view_create_info.pNext = &usage_info;
		}
	}
	VkResult err = vkCreateImageView(device, &image_view_create_info, nullptr, &texture.view);
	ERR_FAIL_COND_V_MSG(err, RID(), "vkCreateImageView failed with error " + itos(err) + ".");
	texture.owner = p_with_texture;
	RID id = texture_owner.make_rid(texture);
#ifdef DEV_ENABLED
	set_resource_name(id, "RID:" + itos(id.get_id()));
#endif
	_add_dependency(id, p_with_texture);
	return id;
}
RID RenderingDeviceVulkan::texture_create_from_extension(TextureType p_type, DataFormat p_format, TextureSamples p_samples, uint64_t p_flags, uint64_t p_image, uint64_t p_width, uint64_t p_height, uint64_t p_depth, uint64_t p_layers) {