To fix this issue, I have added below 2 lines in my local.settings.json file
local.settings.json
"FUNCTIONS_WORKER_RUNTIME": "dotnet-isolated", "FUNCTIONS_V2_COMPATIBILITY_MODE": true,