As you revealed enough details on this issue, I think the cause is also clear. Not sure from where did you get an out-of-date guide to publish this Python web app to Azure App Service (Windows), but it is no longer supported by Microsoft.
You can find the statement "Linux is the only operating system option for running Python apps in App Service. Python on Windows is no longer supported." in https://learn.microsoft.com/en-us/azure/app-service/configure-language-python
To learn how to deploy it to App Service (Linux) you can refer to the tutorial here, https://learn.microsoft.com/en-us/azure/app-service/quickstart-python?tabs=flask%2Cwindows%2Cazure-portal%2Clocal-git-deploy%2Cdeploy-instructions-azportal%2Cterminal-bash%2Cdeploy-instructions-zip-azcli