The SAP Agent is not handling the skipped chain children correctly.
This is bug of the SAP agent
12.2.2 SAP Agent
A problem has been fixed where an SAP Process Chain stayed running indefinitely in the Automation Engine if it contained skipped steps.
Update to a fix version listed below or a newer version if available.
Component(s): SAP Agent
Automation.Engine 12.2.7 - Available
Automation.Engine 12.3.4 - Available