"If you can't beat them, join them" 成语 or 俗语
The essence of  &quot;If you can't beat them, join them.&quot; is &quot;It is better to be  practical and join the winning side than being stubborn and stick to one's own position.&quot;
The example you gave for this idiom, describes &quot;識時務者為俊傑&quot; (Ones who understand situations and act accordingly, are the elites) very well.

所謂「識時務者為俊傑」，當對手強橫無比，而自己又一無所有時，唯有順應時勢，才不致因彼此對峙而有所耗損。
&quot;Ones who understand situations are elites&quot; means when the opponent is too strong to overcome, you can only conform to the situation to avoid meaningless lost&quot;