You cant of course. Maybe Mods...
But its the bed AI we have...
Instead of defende Settlements behind covers and with the support of turrets, your Settlers have this tendency to make suicide attacks out of Settlements limits...
Best to give them good weapons and armor - they're stupid and need it.
My settlers do seem a bit "jumpy" at times. I guess I would be too if I had to deal with daily attacks by raiders and super mutants.
I've taken to giving my settlers armor as well as assault rifles, gauss rifles, miniguns. At level 67 the settlement attacks can be pretty intense.