Azure Functions Isolated worker model adding to Azure Storage queue error: System.ObjectDisposedException

Has anyone tried the following Microsoft quickstart “Connect Azure Functions to Azure Storage using Visual Studio Code” with Isolated worker model?
https://learn.microsoft.com/en-gb/azure/azure-functions/functions-add-output-binding-storage-queue-vs-code?pivots=programming-language-csharp&tabs=isolated-process

I have created an acync version and it works fine initially but then, after submitting 4 – 5 requests (by adding messages to the queue) got the following error and the function stops inserting messages to the queue:

[2024-12-08T05:54:01.909Z] Executed 'Functions.HttpTrigger3' (Failed, Id=d7c6cdb1-63a8-4c53-9e1f-abb7b6572ec4, Duration=70ms)
[2024-12-08T05:54:01.912Z] System.Private.CoreLib: Exception while executing function: Functions.HttpTrigger3. System.Private.CoreLib: Result: 
Failure
Exception: System.ObjectDisposedException: IFeatureCollection has been disposed.
[2024-12-08T05:54:01.915Z] Object name: 'Collection'.
[2024-12-08T05:54:01.916Z]    at Microsoft.AspNetCore.Http.Features.FeatureReferences`1.ThrowContextDisposed()
[2024-12-08T05:54:01.917Z]    at Microsoft.AspNetCore.Http.Features.FeatureReferences`1.ContextDisposed()
[2024-12-08T05:54:01.918Z]    at Microsoft.AspNetCore.Http.Features.FeatureReferences`1.Fetch[TFeature](TFeature& cached, Func`2 factory)      
[2024-12-08T05:54:01.919Z]    at Microsoft.AspNetCore.Http.DefaultHttpResponse.get_StatusCode()
[2024-12-08T05:54:01.920Z]    at Microsoft.Azure.Functions.Worker.Extensions.Http.AspNetCore.AspNetCoreHttpResponseData.get_StatusCode() in /mnt/vss/_work/1/s/extensions/Worker.Extensions.Http.AspNetCore/src/HttpDataModel/AspNetCoreHttpResponseData.cs:line 39
[2024-12-08T05:54:01.921Z]    at Microsoft.Azure.Functions.Worker.Rpc.RpcExtensions.ToRpcHttpAsync(HttpResponseData response, ObjectSerializer 
serializer) in D:a_work1ssrcDotNetWorker.GrpcRpcExtensions.cs:line 88
[2024-12-08T05:54:01.922Z]    at Microsoft.Azure.Functions.Worker.Rpc.RpcExtensions.ToRpcAsync(Object value, ObjectSerializer serializer) in D:a_work1ssrcDotNetWorker.GrpcRpcExtensions.cs:line 35
[2024-12-08T05:54:01.923Z]    at Microsoft.Azure.Functions.Worker.Handlers.InvocationHandler.InvokeAsync(InvocationRequest request) in D:a_work1ssrcDotNetWorker.GrpcHandlersInvocationHandler.cs:line 102
Stack:    at Microsoft.AspNetCore.Http.Features.FeatureReferences`1.ThrowContextDisposed()
[2024-12-08T05:54:01.924Z]    at Microsoft.AspNetCore.Http.Features.FeatureReferences`1.ContextDisposed()
[2024-12-08T05:54:01.924Z]    at Microsoft.AspNetCore.Http.Features.FeatureReferences`1.Fetch[TFeature](TFeature& cached, Func`2 factory)
[2024-12-08T05:54:01.925Z]    at Microsoft.AspNetCore.Http.DefaultHttpResponse.get_StatusCode()
[2024-12-08T05:54:01.926Z]    at Microsoft.Azure.Functions.Worker.Extensions.Http.AspNetCore.AspNetCoreHttpResponseData.get_StatusCode() in /mnt/vss/_work/1/s/extensions/Worker.Extensions.Http.AspNetCore/src/HttpDataModel/AspNetCoreHttpResponseData.cs:line 39
[2024-12-08T05:54:01.927Z]    at Microsoft.Azure.Functions.Worker.Rpc.RpcExtensions.ToRpcHttpAsync(HttpResponseData response, ObjectSerializer serializer) in D:a_work1ssrcDotNetWorker.GrpcRpcExtensions.cs:line 88
[2024-12-08T05:54:01.928Z]    at Microsoft.Azure.Functions.Worker.Rpc.RpcExtensions.ToRpcAsync(Object value, ObjectSerializer serializer) in D:a_work1ssrcDotNetWorker.GrpcRpcExtensions.cs:line 35
[2024-12-08T05:54:01.929Z]    at Microsoft.Azure.Functions.Worker.Handlers.InvocationHandler.InvokeAsync(InvocationRequest request) in D:a_work1ssrcDotNetWorker.GrpcHandlersInvocationHandler.cs:line 102.

After a couple of minutes the function app recovers, but then after submitting several more requests got the error again.

Source code is listed below. I found the problem is related to the MultiResponse as if I change it to write to the queue only or just return HTTP response it works fine.
The In-process Model version works perfect when sending to the queue and returning HTTP response.

namespace HttpTriggerAppVSC
{
    public class HttpExampleVSC
    {
        private readonly ILogger<HttpExampleVSC> _logger;

        public HttpExampleVSC(ILogger<HttpExampleVSC> logger)
        {
            _logger = logger;
        }
    
        [Function("HttpTrigger3")]
        public async Task<MultiResponse> HttpTrigger3(
            [HttpTrigger(AuthorizationLevel.System, "get", "post")] HttpRequestData req,
            FunctionContext executionContext, CancellationToken cancellationToken)
        {
            var logger = executionContext.GetLogger("HttpExampleVSC");
            logger.LogInformation("C# HTTP trigger function processed a request.");
    
            string name = req.Query["name"];
    
            string requestBody = await new StreamReader(req.Body).ReadToEndAsync();
            dynamic data = JsonConvert.DeserializeObject(requestBody);
            name = name ?? data?.name;
    
            string message = string.IsNullOrEmpty(name)
                ? "This HTTP triggered function executed successfully. Pass a name in the query string or in the request body for a personalized response."
                : $"Hello, {name}. This HTTP triggered function executed successfully.";
    
    
            //if (cancellationToken.IsCancellationRequested)
            //{
            //    return null;
            //}
            
            var response = req.CreateResponse(HttpStatusCode.OK);
            response.Headers.Add("Content-Type", "text/plain; charset=utf-8");
            await response.WriteStringAsync(message);
    
            // Return a response to both HTTP trigger and storage output binding.
            return new MultiResponse()
            {
                // Write a single message.
                Messages = new string[] { message },
                HttpResponse = response
            };
        }
    }
    
    public class MultiResponse
    {
        [QueueOutput("outqueue",Connection = "AzureStorageAccount")]
        public string[] Messages { get; set; }
        public HttpResponseData HttpResponse { get; set; }
    } 
}

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật