Isis came about really do divide the rebel movement. It helped Assad, it helped Iran, it helped Russia, it helped the PKK, it helped Isreal. The only people that lost from Isis was the legitimate rebel opposition. Who in an instant were completely delegitimised internationally and their only real backer Turkiye was dragged into the mud with all sides conveniently running with the same propaganda.
Even western media was pushing stories about how the US, Russia, Iran, PKK Kurds and Assad are all on the same side in the battle. Because this battle would keep Syria divided.
The reason for this is because a rebel victory back then would have kept the nation united and in one piece. The anglo-ameircan world didn't want that, while the assad/iran axis took it as blessing to beat back the rebel movement.
Here we have to give Turkiye credit, despite pressure from the US, EU, Russia, Iran, Assad, PKK. and Isreal, Turkiye stood firm. In the end her side came out the biggest winners. The biggest losers were of course Iran and Assad. Russia lost too, but Russia for geopolitical reasons will be invited back in by the Syrian government as a hedge and leverage against the USA/Isreal to a degree.
Its worth keeping in mind that Turkish support of the Syrian rebels caused both the USA and Russia to threaten Turkiye with war at various points. Probably the best moment was trumps letter threatening Erdogan not to move and as story goes he threw the letter in the bin and sent the Turkish army in anyway.