There have been cases in the US where homeowners shot cops dead who were in the process of unexpectedly raiding their home, because the homeowner had no idea they were cops and not home invasion robbers; and in some cases have been acquitted of murder charges by juries for this.
I'd personally like to see the laws protecting this strengthened, to make sure that cops aren't charging unannounced into peoples' homes and then charging the homeowner with murder when they react with reasonable gun violence in self-defense.
I would much prefer a society where all homeowners and cops don't carry guns and cops were fired for illegal raids.
My thought on this is that it's basically not legal to protect your home/family with force because of this. It's impossible to know if someone breaking in is a cop or not, and at 3AM with glass breaking and a group of people claiming to be cops, but aren't, how are you supposed to know? You basically never can. So either you risk going to prison for the rest of your life when it's actually a cop, or you do absolutely nothing and let your family get harmed/your home burgled.