Well, to continue the mystery… I just ran the Shortcut again and it worked fine. Not a single change in either the Shortcut or the device state since the last run that failed.
Did you open the shortcut before running it? There are memory limits and often having the shortcut open allows you the memory required to get the job done whereas running from any other view might not.
I’ve tried to run it so many times I’m honestly not sure! It was certainly failing running from the open shortcut and I think it was failing when running from the Library view.
I can’t reproduce the issue… It’s running consistently now, so I guess I will close this ticket!