First, Linux is currently the recommended environment for hosting Python with the App Service.
Linux is currently the recommended option for running Python apps in App Service.
https://learn.microsoft.com/en-us/azure/app-service/configure-language-python
On Windows, it doesn't run as the App Service runtime, but it works with extensions. However, although it can be used as described below, there is also a statement that it will not be updated or provided in the future.
[! Note] Python support in Azure App Service for Windows has been officially deprecated. As a result, Visual Studio publish commands are officially supported only for IIS targets and no longer officially supported for remote debugging in Azure App Service.
However, the Python extension for App Service on Windows has not been serviced or updated, but is still available. Therefore, the publishing function to App Service in Windows will work for a while.
As far as I can see in the Azure portal, it was still available up to 3.6.4. You may be able to update up to that point.
If it doesn't appear in the console, try using Azure Resource Manager to specify the version by following the steps below.
Please also refer to the following thread.
https://learn.microsoft.com/en-us/answers/questions/24290/flask-web-service-on-windows-platform.html
I think migrating to Linux is the best if possible.