All police agencies of which I am aware have the same policies in place (not verbatim):
1)The uniformed officer is instantly in charge and is to be instantly obeyed without delay or discussion.
2)Off duty/plain clothes officers act, essentially, as civilians. They get down, get cuffed, drop their guns, whatever, just like any other person who's not in uniform.
3)Anyone who is not known, who has a gun, is treated as a threat. Badge or no badge. They comply or they're a threat. A move that is threatening gets the appropriate response, including gun fire.
The shooting course used by our local training facility includes a pop-up target of a guy holding a gun pointed at the officer as well as a local police badge.... all officers are trained the same way... shoot him.
Still happily answering to the call-sign Peetza.
The problem, as you so eloquently put it, is choice.
He is no fool who gives what he can not keep to gain what he can not lose.
-Jim Eliott, paraphrasing Philip Henry.