I had a similar problem.
I was able to fix it by creating a managed identity for my app service and then going to ACR and in IAM assigning this app service identity theAcrPull role.
AcrPull