A dysfunctional team dynamic: the Unhappy Number 2.
This can happen if the subordinate doesn't view their superior as legitimate.
The subordinate goes along with whatever the superior says, but they don't believe in it.
They are incentivized to do malicious compliance–just enough to make it clear they're complying, but in ways that will blow up later, proving the superior is wrong.
This is fundamentally a dysfunctional dynamic.
The only answer is often for the number 2 to go somewhere where they can be number 1, or where they can work for a number 1 they believe in.