This annoys a lot, whenever the zombies get too close the character raises the weapon, and they just take it instead of killing the zombies, especially when they surround you you always die and you can't kill them and get out alive. I found a mod that solves this so it seems very simple for you to fix it, take a look at what I'm talking about.
https://steamcommunity.com/sharedfiles/filedetails/?id=2512622371&searchtext=