The Turkish president has warned that Ankara will attack Syrian forces if they do not withdraw to the borders of the 2018 Sochi agreement.