Gitlab Registry: Error when trying to reuse blob at destination - 422 (Unprocessable entity)

The full error is (project masked at the request of the project owner):

error pushing image "registry.gitlab.com/mdspencer/xxxxxxxx/test:v1" to "docker://registry.gitlab.com/mdspencer/xxxxxxxx/test:v1": Error trying to reuse blob sha256:e954aa83447a8628e19e4663d4f71f3a7daf8471fb860b4b674167007023e73b at destination: Requesting bear token: invalid status code from registry 422 (Unprocessable Entity)

I am using Ubuntu server 20.04 and buildah 1.21.3. I have successfully logged in to registry.gitlab.com and have set the appropriate rights on the login to pull and push container images. On most occasions, I am able to push images. Occasionally, I see the above error. I tried creating the simplest possible image and pushing it. The first time failed and when I tried immediately after with no changes, the push was successful. The output from both builds is below:

bash-5.1$ ./build.sh 
Resolving "php" using unqualified-search registries (/etc/containers/registries.conf)
Trying to pull docker.io/library/php:7.4.22-fpm-alpine3.14...
Getting image source signatures
Copying blob f4ff9828d954 done  
Copying blob ab783d928286 done  
Copying blob 5843afab3874 done  
Copying blob 7fbf46d81074 done  
Copying blob 165b10189b0f done  
Copying blob cfcf566573f3 done  
Copying blob fc171a495e28 done  
Copying blob 815a8e73490f done  
Copying blob ff975695c8bb done  
Copying blob 0d217a6c1ef1 [======================================] 17.4KiB / 17.4KiB
Copying config 5ae3ea6579 [======================================] 10.6KiB / 10.6KiB
Writing manifest to image destination
Storing signatures
Container is php-working-container
Setting the entrypoint.
Committing the image php-working-container as registry.gitlab.com/mdspencer/xxxxxxxx/test:v1
Getting image source signatures
Copying blob 72e830a4dff5 skipped: already exists  
Copying blob e954aa83447a skipped: already exists  
Copying blob f5822d56bb4e skipped: already exists  
Copying blob 519f9b52fd0c skipped: already exists  
Copying blob 1680127eacc8 skipped: already exists  
Copying blob 92c5a6784214 skipped: already exists  
Copying blob d2cbb71fe3ec skipped: already exists  
Copying blob 5be9c43f2afa skipped: already exists  
Copying blob d72b83c5ea5a skipped: already exists  
Copying blob 95369b37ee61 skipped: already exists  
Copying blob a51ee134de84 done  
Copying config 36b296f299 done  
Writing manifest to image destination
Storing signatures
36b296f29915a4315f77e34e20b555b2bc2384b283480b434096347034233746
Pushing the image to registry.gitlab.com/mdspencer/xxxxxxxx/test:v1
Getting image source signatures
Copying blob 519f9b52fd0c done  
Copying blob 1680127eacc8 done  
Copying blob 72e830a4dff5 done  
Copying blob 5be9c43f2afa done  
Copying blob 92c5a6784214 done  
Copying blob d2cbb71fe3ec done  
Copying blob d72b83c5ea5a done  
Copying blob 95369b37ee61 done  
Copying blob a51ee134de84 done  
error pushing image "registry.gitlab.com/mdspencer/xxxxxxxx/test:v1" to "docker://registry.gitlab.com/mdspencer/xxxxxxxx/test:v1": Error trying to reuse blob sha256:e954aa83447a8628e19e4663d4f71f3a7daf8471fb860b4b674167007023e73b at destination: Requesting bear token: invalid status code from registry 422 (Unprocessable Entity)
ERRO[0017] exit status 125                              
Restoring old working directory.
bash-5.1$ ./build.sh 
Container is php-working-container-1
Setting the entrypoint.
Committing the image php-working-container-1 as registry.gitlab.com/mdspencer/xxxxxxxx/test:v1
Getting image source signatures
Copying blob 72e830a4dff5 skipped: already exists  
Copying blob e954aa83447a skipped: already exists  
Copying blob f5822d56bb4e skipped: already exists  
Copying blob 519f9b52fd0c skipped: already exists  
Copying blob 1680127eacc8 skipped: already exists  
Copying blob 92c5a6784214 skipped: already exists  
Copying blob d2cbb71fe3ec skipped: already exists  
Copying blob 5be9c43f2afa skipped: already exists  
Copying blob d72b83c5ea5a skipped: already exists  
Copying blob 95369b37ee61 skipped: already exists  
Copying blob ff98a29c7e7e done  
Copying config d8b7fd43ce done  
Writing manifest to image destination
Storing signatures
d8b7fd43ce6d4c29b4a75917008a089f1a25de9ee50122f053b8dad591bfce00
Pushing the image to registry.gitlab.com/mdspencer/xxxxxxxx/test:v1
Getting image source signatures
Copying blob f5822d56bb4e done  
Copying blob e954aa83447a done  
Copying blob 519f9b52fd0c skipped: already exists  
Copying blob 1680127eacc8 skipped: already exists  
Copying blob 92c5a6784214 skipped: already exists  
Copying blob 72e830a4dff5 skipped: already exists  
Copying blob d72b83c5ea5a skipped: already exists  
Copying blob d2cbb71fe3ec skipped: already exists  
Copying blob 95369b37ee61 skipped: already exists  
Copying blob 5be9c43f2afa skipped: already exists  
Copying blob ff98a29c7e7e done  
Copying config d8b7fd43ce done  
Writing manifest to image destination
Storing signatures
Restoring old working directory.

The container image is based on one that is pulled from the docker registry (php:7.4.22-fpm-alpine3.14). Happy to provide the scripts that are used if anyone thinks it will be relevant. This appears to happen with any of the four images that I build and there is no real pattern to it. The majority of the time, the push is successful.

Is there anything I can do to address this, or is likely to be a transient error that I just need to pick up and handle as part of my pipeline?