It's a simple matter of what can be controlled and what can't. You can change security protocols by deliberation. You can't change the fact that there will be violent people who try to do horrible things like this.
At best, the handgun was the material cause of the police officer's death. The efficient cause of the police officer's death was the criminal.
This has greater significance, it seems to me, in reminding us, against the stupidity of the Black Lives Matters people, that criminals are dangerous. They can and do try to kill police officers.
Maybe we should think twice, maybe even thrice or more, before we criticize a police officer for using lethal force.
In fact, the fact is, had it happened differently, i.e., had the police officer been forced to shoot the criminal, people would be up in arms about this: "He shot an unarmed suspect who was in a hospital bed? That monster!"
It's positively ridiculous.