Yes, resisting arrest and assault of a police officer are crimes and you could be arrested if you did these things. You might even even be justifiably shot if you were struggling for the police officer's gun. But even if you did this (which is far from established in this case) you cannot justifiably be shot latter, when fleeing, unless you represent a likely and imminent threat of harm to other people it is the law.
At yes, if you approach a police officer with a hand in your back pocket, and don't stop it on command, you do represent a likely and imminent threat of harm to the officer. It may be an empty threat. But it is a threat. The police officer is then allowed to do whatever neutralizes the threat: they may shoot you if they think that is the minimum use of force required to eliminate the threat. But they can't shoot you legally if you then run. They certainly can't keep pumping bullets into you once the threat is eliminated. That is an execution.