The buffer zone was removed in early October of 2019 when then-President Trump pulled all American troops from this zone after a phone call with Erdogan, breaking long-time alliances and allowing Turkish troops to swarm in and massacre long-time US allies in the war against ISIS, the Syrian Democratic Forces, otherwise known as the ethnic Kurds.
However, the US troops were not there just to keep peace between Syria and Turkey, but also sat as a mid-range nuclear deterrent against Russia's invasion of Europe since the cold war. 50 US B61 nuclear bombs are at Incirlik Air Base, just 100 miles from the Syrian border, since around the Bay of Pigs.
Unfortunately for Turkey, the buffer zone was for both parties' safety, and when the Kurds began to rally a counteroffensive, Turkey sought to have the buffer zone reinstated.
The only party willing to step into the power vacuum was Russia, which has long been at odds with Turkey, and was hoping for access to Incirlik if the Turks ever kicked the US out of Turkey entirely. While this buffer zone (known as the Second Northern Syria Buffer Zone) has remained intact since then, it has been with much infighting between the Turks and the Russians, especially once Russia began de-prioritizing their patrols in the first months of 2022.
So while we haven't yet received his explicit motivations, seeing his logic up to this point seems to suggest that he was willing to put up with the Russians when it meant (near)-complete safety on their southern border without having to commit most of his troops. Now that the buffer is becoming porous, the cost of keeping the Russians is outweighing the benefit.