The question was raised since commonsense, and Torah provide guidance what to do when they conflict?
Additionally, the Torah says to listen to Sanhedrin Right and Left. There is a dispute between the Yerushalmi and other sources whether that means even when they say right is left
Finally we know that saying something which isn't true is bad. Are there times when it is good?
The answer is simple. If there is an actual conflict, then Torah is followed
For example commonsense might say homosexuality, adultery or pedophilia is good but Torah says otherwise so we follow the Torah
The issue of Sanhedrin or Gedolim is more complicated with some claiming that they must always be followed while others say that they sometimes err so when they err do not listen to them.
Rav Yakov Kaminetsky says Truth is that which is desirable to G-d and not whether it is factual
To tell a rodef where his intended victim is hiding, while being factual is undesirable
Similarly lies can be told to save lives or preserve the peace and other reasons
However the Ramban says even if beis din tells you to kill someone you know is innocent or to eat food you know is unkosher - they must be believed.
Others claim the survival of society requires obeying authority even when wrong.
Chazon Ish notes that commonsense tells you that if a school has a teacher who has served the community well for many years not to replace him with a new teacher who is more successful but the halacha is otherwise.
A woman might claim she will commit suicide if she is kept from adultery or abortion while Torah prohibits.
A doctor might encourage suicide in cases of age, suffering or mental illness. while these are obvious from commonsense the Torah prohibits
Commonsense says a woman should not be stuck with a husband she doesn't like but the Torah says that doesn't end the marriage without a get.
This is summarized by Rav Soloveithik who said the Jews sacrificed their seichel at Sinai.