That is not completely true. Jesus said to his disciples, “The scribes and the Pharisees sit on Moses’ seat; therefore, do whatever they teach you and follow it; but do not do as they do, for they do not practice what they teach."
Also in Acts:
Acts 23:3-5, "At this Paul said to him, “God will strike you, you whitewashed wall! Are you sitting there to judge me according to the law, and yet in violation of the law you order me to be struck?” Those standing nearby said, “Do you dare to insult God’s high priest?” And Paul said, “I did not realize, brothers, that he was high priest; for it is written, ‘You shall not speak evil of a leader of your people.’”
So we see that the person's behavior doesn't effect their authority. We are to still acknowledge their authority.