Regression: race condition pushing two or more manifests by tag with the same digest

We're currently experiencing the same issue as described in #640 (closed) in one of our repositories. I can't reproduce it with a blank repository, but with a fork of our repository (See: https://gitlab.com/thund/map).

Basically what we're doing is: Building a container image using jib with latest tag and additionally tag the image with the Commit Hash. This results in two manifests being pushed concurrently, and we're getting the exact same error:

34962 [DEBUG] Pushing manifest for latest...
34966 [DEBUG] TIMING	Pushing manifest
34968 [DEBUG] Pushing manifest for 07ef6292...
35021 [DEBUG] TIMED	Pushing manifest : 59.834 ms
35026 [DEBUG] TIMED	Building and pushing image : 10831.079 ms
35027 [DEBUG] TIMED	Pushing manifest : 60.558 ms
35068 [INFO] 
35071 [INFO] ------------------------------------------------------------------------
35072 [INFO] BUILD FAILURE
35072 [INFO] ------------------------------------------------------------------------
35073 [INFO] Total time:  32.616 s
35077 [INFO] Finished at: 2023-04-23T12:48:57Z
35077 [INFO] ------------------------------------------------------------------------
35080 [ERROR] Failed to execute goal com.google.cloud.tools:jib-maven-plugin:3.3.1:build (default-cli) on project map: 500 Internal Server Error
35080 [ERROR] PUT https://registry.gitlab.com/v2/thund/map/manifests/latest
35081 [ERROR] {"errors":[{"code":"UNKNOWN","message":"unknown error","detail":{}}]}