The thing with NPCs dying to enemy attacks and such is all about NPC placement. Basically, if you place people where it makes sense for them to be in the world, they won't die - important characters in New Vegas weren't at risk because they were on settlements, bases, houses, etc... places where it makes sense for them to be living in, basically. Skyrim wouldn't have needed so many immortal NPCs if they had scripted citizens to enter their homes during dragon/vampire attacks, or if they put all important NPCs inside city walls or other places they would logically be protected. There's also the problem of a huge amount of characters who were essential for no reason, like that racist Rolff guy from Windhelm, who was only immortal because he was potentially involved in a supremely minor randomly generated Thieves Guild quest. If the "radiant quest system" had worked as promised the quest objective would have just moved to another NPC, but since it didn't, we're stuck with this unlikeable character wandering around permanently. Playing an elf who can't stand his racism, or an imperial soldier promoting the law, or just a hero who is full of his bullshit? Doesn't matter as there's nothing you can do anyway.
But really, though, we have to revisit the concept of why we're having immortal characters in the first place. Ideally you will structure your main quest in a way that you can still complete the game no matter what path you choose; games like Morrowind or New Vegas do this. The former has a back path that works even if you kill an important character, the latter has Yes Man. Both alternate choices are more difficult than normal gameplay, but they are there, at your disposal if you want to play a kind of character who does things differently. Oblivion was the first Bethesda game to implement essential NPCs but as far as the average playthrough is concerned, they were far less intrusive; only a small amount of characters was immortal, and the majority ceased to be unkillable as soon as they were no longer necessary. While it's obviously not as a good a system, it worked, and balanced being free to act however you want and still telling the story you want to tell.
On its announcement, Skyrim was said to be reinventing these ideas with the so-called Radiant AI. In theory, minor NPCs could die and you would still be able to complete their quest, either because somebody replaced that NPC, or maybe there was another path you could take. The biggest promise I would say that was touted was the "endless" questlines. How you would always have another quest to complete - on a surface level, they are right, you can kill an infinite number of people in the name of Sithis, or burglarize an infinite number of houses. The problem with the function is that the quests aren't anything that have any impact on the world at all (which is already something Skyrim suffers from significantly). The people you kill for the Dark Brotherhood don't exist until you take that quest, and even then, it's just a randomly generated NPC that has no real name, wanders an aimless path, never talks to anyone, and eventually respawns. Killing that person serves no purpose and ultimately feel shallow and pointless. The side jobs you can get for the Thieves Guild are perhaps even worse, as the way the system works, you can be sent to rob valuable items from houses that are basically the equivalent to a trailer park home. It's not realistic for this great thief to be robbing a person like that and the immersion falls more and more as you see how poorly thought out the random quests are.
However, that aspect could at least be considered as a feature that was way too hyped and ended up being underwhelming. But the part about being able to complete quests even if the NPCs involved die was an outright lie, as there isn't a single quest in the game, small or large, that follows this principle.
So the new features Skyrim was supposed to have either didn't work as they should, or didn't exist at all. We're left with immortal NPCs again. The game commits another mistake in this part, however: compared to Oblivion, not only is the amount of essential characters greatly increased (including minor quests like "Go to X dungeon and watch out for Draugr" which did not need that character to be essential), they no longer stop being essential after their respective quests are completed for the most part. Only a few, like the Companions, become killable after their relevance is over. Maven Black Briar is necessary for a single dialogue in the second quest of the Thieves Guild questline? Too bad, she's immortal forever. (Fallout 3 also did this, by the way. For most essential characters, you just need to change a few details in the quests and they would no longer have to be unkillable.)
The way NPCs act and react based on quests is broken, and not just because you can't kill people. Quests don't actually change the world at all, and you'll still be advised to join the College of Winterhold even if you're the Arch-Mage. It doesn't take much to make the world seem reactive even if it's in a minimal sense. Fallout 1 had the Unity mutants overrun Necropolis after enough time, less if alerted them by killing Harry's team (see the player's actions helping shape the consequences). Morrowind would have more sleepers and Sixth House attacks the longer you went along the main story. Oblivion had gates disappearing and NPCs changing their weekly schedules. And perhaps the best example, New Vegas had piles of changes in dialogue with every quest you did, factions would make comments based on your reputation and even related to specific quests you did to help them, companions would speak and act differently depending on what you do while they are with you, or what phase of the main quest you are in... there were even some dynamic events like the destruction of Ranger Station Charlie or the takeover of HELIOS One.
In Skyrim, the lack of any such thing ends up creating a world where you feel as if nothing has changed since you left that cave leading out of Helgen, and despite your powers and the fact that your actions would have significant influences, the world goes on apathetic to everything. Just look at the Civil War, huge part of the game that is literally all over the map... changes nothing, people don't act like the conflict is over and you can't even kill the lieutenants at each camp because, again, they are essential for no reason.
When it comes to Fallout 4, there's a reason immortal NPCs, and other aspects, are something people talk about so much. Fundamentally, the issue isn't in killing one character. It's about the whole design philosophy that tries to control more and more of what you can or can't do, leaving the player with virtually no agency on the game world, or its characters, or even its smallest quests.