I actually wrote something similar for my own play. There's a "Confidence" value setting for every NPC, and it can be set to "Cowardly", "Cautious", "Average", "Brave" and "Foolhardy". Most enemies throughout the game are set to "Foolhardy", meaning that for the most part, they rush you like idiots. (If all your enemies are running away from you, my guess is that you have a mod somewhere in your load order that's flipping their Confidence settings to Cowardly, which does make them run away.) In my own game, I've left raiders as Foolhardy (junkie meth-head nutballs), but I've set Gunners, Triggermen, etc. - anyone who can be expected to have some training and NOT be PCP'ed out of their minds - to Brave. "Brave" enemies spend a lot more time taking cover and being tactical. They move hard, but they move smarter. So yeah, again, check your mods. Something's screwing with your NPC confidence settings, probably turning them all Cowardly. Im not sure, I think it may be Arbitration but I do love everything else that goes with that mod