A previous LEO poster mentioned to me a case in a PM where a husband heard his wife was in a mall with an active shooter. He drove up and with handgun in hand ran for the mall entrance. He was close to being shot by first responders but was lucky and brought to a stop instead.
Given police shoot undercover officers enough to make it a problem - it's a risk if you go in the run with a gun out in civies.
You need to decide your risk tolerance.
If you have a gun out, you have increased your chance being shot. Hey, in a FOF with officers, I was 'shot' just standing there with my hands up.
There's no right answer - just skills, mindset and the circumstances. You need to think through, coldly and rationally what you want to do given circumstances.