You’d have to criminalize knocking on doors because the home invader could have a false noncommercial purpose. Could be knocking on the door for directions, or to convert you to a new religion or something … it’s not the business purpose alone that’s a problem it’s the approach to the door.
We could solve the problem by changing the law to make it OK to shoot and kill anyone within the curtilage of your home.
But that has some problems.
Alternatively we could mandate locked fencing around home entryways.
Personally I assume anyone unknown at my door has a nefarious purpose and am prepared to kill if necessary. However if you open the door with gun in hand you are likely guilty of assault with a deadly weapon. No one should open the door to a stranger.