They can only disarm you during an official detention with reasonable and articulable suspicion of a crime being committed or about to be committed. Your first question should be "Am I being detained?" If the answer is no, end the encounter. or if you prefer to ask, "Am I free to leave?" and the answer is yes, then leave.
Once you verify that you are being detained, when the officer wants to disarm you, your only real option is to inform the officer, "I do not consent to surrendering my firearm to you, but I will not resist." You can physically resist if you want, but I wouldn't recommend it.
If you verify that you ARE being detained, and there is no RAS, the next step is to ask for a supervisor to come to the scene and to attempt to work it out with the supervisor. If that doesn't work, you'll have to take it to higher authority and/or lawyer up.
Also, if you are in a public place such as a restaurant, it is generally a good idea to not "step outside" with the officer. Keep the encounter in the public place. More chance of witnessess/vido surveilance that way.
Pretty bad when we have to strategize encounters with police officers in America.