The correct keyword to exit the block of a cucumber step is next, not return.
next
return
Closes #20276 (closed)