There is a widely used 5 color system used to illustrate LEO levels of attentiveness.
White – not focused
Yellow – no target, focused on surroundings
Orange – focused on target and surroundings
Red – focused only on target (use of force)
Black – panicked, fight or flight
Basically you want to operate at yellow for patrol and going around town, and orange when on task. Red only momentarily, and have the training to never enter black.
As you guys pointed out LEOs need to be vigilant and it is recommended that officers take safety refresher courses when they feel themselves slipping in this area. I’m certain more people enter white than they would care to admit. The problem for LEOs is that they can be the victims well planned attacks; even when alert they can still be caught off guard.