You need to ensure he service trying to access the ACR is properly authenticated. I will recommend configuring a managed Identitiy for this. You can then assign a reader or contributor role to this:
Assign Azure roles to a managed identity (Preview)
To create a managed Identity you can:
In the left-hand menu, select Identity under the Settings section.
Under the System-assigned tab, switch the Status to On.
Click Save. This will create a system-assigned managed identity.
Also See:
https://learn.microsoft.com/en-us/azure/container-registry/container-registry-troubleshoot-login
https://learn.microsoft.com/en-us/azure/container-registry/container-registry-roles?tabs=azure-cli
You can mark it 'Accept Answer' and 'Upvote' if this helped you
Regards,
Abiola