Shortcut with "speak text" will not run unless phone is unlocked.
Looks like this is an old issue, as seen here:
Allow shortcuts to run when phone is lock… - Apple Community
Still has not been fixed. I created a shortcut with a "Speak text" step, which works well when running it from the Shortcuts app, and when using Siri to activate it when my phone is unlocked. If I try to activate it from Siri when my phone is locked, Siri says that I need to unlock my phone first. I have Siri set to activate even when the phone is locked. This is especially annoying since I wanted to use this shortcut via CarPlay (activated by Siri), but to use it I have to hold my phone up to my face while I'm driving (which is not what I want).
iPhone 14 Pro