This is probably often the case.
There was a case here in the Netherlands in which a robber was shot dead with an illegal gun (there are pretty strict gun laws here). The robber followed the victim after they retreated in to a backroom. The robber started trying to breakdown the door. The victim shot the robber through the door. The DOJ didn't even bring it to court.
https://www.nu.nl/binnenland/3885305/juweliersvrouw-deurne-n...