You cannot expect to survive in that scenario. Most likely, you will be shot by either the perpetrator or one of the responding officers.
If you are very lucky, the responders may be calm, approach from sound tactical cover, and give verbal commands that allow you to de-escalate. The perpetrator may also stay calm and follow police commands.
Counting on luck is a bad tactical plan. Best to be several body lengths distance away from a perpetrator, and have a weapon holstered when officers show up. Hands in plain view as well. Expect a lot of confusion and a possible arrest. Don't talk.
That scenario may be a little extreme, but I could see a situation where disarming may not be advantageous in certain situations. We don’t get to control the events. It can be a very difficult situation.