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,18.104.22.168,22.214.171.124.