What is the best way to leave a church that you know is teaching wrong?
— guestYou can follow Christ's commandment with Revelation 18:4, "Come out of her, my people, that ye be not partakers of her sins, and that ye receive not of her plagues."
Another good scripture to use is 1 John 4:1 "Beloved, believe not every spirit, but try the spirits whether they are of God: because many false prophets are gone out into the world."
These are scriptures that say a person should not remain where teaching is different then what the Bible teaches.
To answer your question more specifically, "what is the best way to leave a church", give a scripture that proves the teaching is wrong. It will be up to the individuals to repent.
When I say unto the wicked, Thou shalt surely die; and thou givest him not warning, nor speakest to warn the wicked from his wicked way, to save his life; the same wicked man shall die in his iniquity; but his blood will I require at thine hand. Yet if thou warn the wicked, and he turn not from his wickedness, nor from his wicked way, he shall die in his iniquity; but thou hast delivered thy soul.
Ezekiel 3:17-18