Thanks for asking question! Could you please try with ODBC Driver 17 for deploying a python flask app on Linux based app services using pyodbc to connect to an Azure DB.
pyodbc.connect(‘Driver={ODBC Driver 17 for SQL Server};SERVER=’+server+’;DATABASE=’+database+’;UID=’+username+’;PWD=’+password)
Let me know if issue persists.