I’ve come across this exact error a few times but they were for a Python Function (Issue linked).
In my experience it’s usually come down to some dependencies or libraries that would fail to load silently in the Function but shows NO errors anywhere in Azure. I believe this to be a bug in Azure Functions, or at least lack of insight for consumers to troubleshoot.
For me I found the Azure Functions Diagnostic tool useful as you can drill down to certain metrics to see if it’s flagging any errors when the Function is trying to load that other logging areas are not showing. Try that and it may point you in the right direction.
In the Function, go to the Diagnose and solve problems page, and locate the Executions metrics to see if it’s showing any errors to address.
https://learn.microsoft.com/en-us/azure/azure-functions/functions-diagnostics#find-the-problem-code
https://learn.microsoft.com/en-us/azure/azure-functions/functions-diagnostics
Hope this helps, if so please feel free to mark as the answer.