Invading Syria would be a fatal mistake for Turkey. Turkey has two main goals in Syria: 1- To destroy the PKK/YPG organization. 2- After overthrowing Assad using the Syrians, to have the Syrians establish a stable government that is not an ally of Iran.
While Turkey is doing these, she also wants the following: Turkey wants to wear down all the parties that will not compromise with Turkey, after a long process of conflict, inside Syria. For example, Turkey cooperated with the US/Israel and made the PKK/YPG elements forced clash with the Iranian militias. Or it forced the Russians to bomb HTS instead of the SNA. Or it provided electronic warfare support to HTS and ensured the fall of Aleppo. Etc etc.
Places like Syria, where everyone is fighting everyone, are not suitable places for direct invasion at all. But they are ideal places where you can set traps for your enemies. And the one who sets the trap does not step into it! This would be the biggest mistake!