Always.
Your boss is always right. Always.
This is the First Rule of Employment.
Remember this - and you will set yourself free - one way or the other.
Your boss is always right because it is her Widget that you are helping to build. Your job is to give whatever expertise that you have to your boss in whatever form that you usually give it. If she says that you're wrong - then she should know because it's her Widget that you're wrong about.
Your job is to build the best Widget possible for your boss to incorporate into her Widget.
If you think that your boss is wrong - there are two possibilities: There is something about your Widget that you don't understand or there is something about the boss's Widget that you don't understand. Because your boss is always right. If you think that your boss is wrong (and of course she's not) then ask sincere questions with the mind of the naïve inquirer. Not in an annoying way - she's busy.
If you're the boss being asked those questions, then be secure enough to respond to them in a non-defensive, open-minded manner. Why wouldn't you? You want the questioner to make the best Widget possible because your Widget depends on it.
If you know that your team will always assume that you are right once you've made a decision - then the pressure is on to make sure that you are right - because they're off making their Widget to plug into your Widget based on the specs that you've given them.
You can't lose, boss. Because if you're confident about your Widget and how your team contributes to it, then the questioner will go away with their answers and do their bit to make sure your Widget is shiny. If the questions do reveal a flaw in your Widget, or at least the questioner's understanding of their Widget, then best to find that out now and remedy it, before your boss - or worse still - your customer does.
(This is the real incentive to have a genuine Open Door policy.)
The 'My Boss is Always Right' Rule is so counter-intuitively empowering. You can't lose - boss or worker.
It frees you up to focus your energies on making your Widget. Or to go and find somewhere else to work where your boss's right aligns with what you think is right.
Or better still - leave and become your own boss. And quickly learn how good life was when you had a Boss that was always right.