The best approach would be to use the managed identities. Your webapp can connect to the database using a AAD identity automatically provided by Azure. This is secure, without you needing to implement all kinds of difficult set-up.
have a look at https://github.com/Azure-Samples/msdocs-django-web-app-managed-identity/blob/main/README.md for some examples.