Why is my flow stuck in a Submitted State?

A similar issue occurs when using sys.exit() in the flow code