By this I mean killing the npcs that have immunity and get right back up. If there is any way to modify the file or mods .
Almost certainly not [yet].
Keep in mind, even if you can change the "essential" attribute to make plot-essential characters killable, Bethesda's Fallout games are coded to prevent hostile or potentially hostility-provocing actions against children. In Fallout 3, it took a user a user-created game mod to restore the ability to kill children, and both Fallout: New Vegas and Fallout 4 have that same hard-coded idiosyncratic stupi... ... "behavior."
(And, ugh, what a dumb design decision the whole no kid killing thing is. One of my fondest memories in Fallout 2 was when the shock of noticing my Childkiller reputation - I accidentally clipped a couple kids with the blast radius of a rocket I fired early on in the game, for which I was punished by bounty hunter attacks and worse prices when trading. Brilliant! Certainly much better than the idea of jamming a bunch of invulnerable NPCs into the game that do nothing but get in the way and annoy me.)