Hi Jaime, the logs may reveal some details about the specific issue, but I believe we've seen this happen with a 403 from the PID provider -- we have this case in the Harvard Dataverse Repository from time to time as well. When we run into the issue where it stays locked for an unreasonable amount of time, we unlock and try the publish again, and it will usually go through. There's another class of failure here related to metadata validation (
https://github.com/IQSS/dataverse/issues/6586), but that failure is less common and usually doesn't reach the stage where the dataset stays locked.
Are you using EZID? If so, is it possible that the publishing time intersected with some maintenance?
It's possible that more technical people will have some better suggestions. We've done work in this area over the last few releases, but we still have work to do.