Rasa-core story graph is changing on every run

To my understanding the story graph being used to train rasa-core model is changing on every train run for the same input data. While trying to see the graph as_story_string the GENR_CYCL_CONN, GENR_CYCL_SINK and GENR_CYCL_SRC tags appear to be changing every time i run the train command. If these tags signify source, connection and sink of the graph edges then changing tags means changing graph edges which results in a different story graph. My theory is that this is the root cause of non-reproducible training results. can someone shed some light on this? is this an expected behaviour?

the problem is that before tags are assigned the topological sort is performed on the cyclic graph which is inherently unstable, producing different sinks, sources and connectors