The queries using “Connect by nocycle” may give different results with different versions.
Please try below workaround.
Alter the session and run the query.
alter session set "_optimizer_connect_by_cost_based"=false;
alter session set optimizer_features_enable='10.2.0.1'
You can see this issue on 10.2.0.4,188.8.131.52,184.108.40.206.