The “home invasion” dillema is this -
what if the “invaders” are shouting “POLICE” while they’re doing it?
Of course, the solution to this is for the police to make it a matter of policy that they never perform home invasions,
so the homeowner always knows that the invaders are NOT police.
That's potentially a big problem, but it has an easy solution. Require the police to turn on cruiser sirens and lights the instant they hit the door. Let the people inside know it's really the police.
No sirens, no lights? Then it's not the police coming through your door.