On this page of the guide to Cyberpunk 2077 we answer the question whether it is possible to kill important story-related characters. This may be an important issue if you want to get the best possible ending in the game.
The quickest answer to this question is: no, important NPCs can't die in random moments of the game. You don't have to be afraid that you will accidentally shoot someone important for the main plot. However, this requires some additional clarification - see below for more information.
It's important to note that many of the locations associated with the major characters are safe zones, including the Afterlife bar in the picture above. You can't use weapons or combat gadgets in these areas. This ensures the safety of the important NPCs and additionally prevents the any fights in such locations which could prevent you from starting or continuing specific quests.
Some of the major plot-related characters can accompany the V in selected missions. You don't have to worry about shooting them by accident, thought, or that they might be killed by the enemies you meet. You don't have to protect these NPCs in any way, because their "premature" death is impossible. Treat their presence simply as free help.
In exceptional cases, the game may allow you to attack a character associated with a quest, but killing them may be forbidden. In the example shown in the picture, one of these characters is Rhino from the Animals gang, whom you can fight as a part of the Beat On The Brat side questline. Even if you attack the Animals from the neighborhood and Rhino joins the fight, the game won't allow you to finally kill him (i.e. his health bar will never fall below 1%).
Important story-related characters may die in certain game quests. In most cases, it is a top-down "planned" death that cannot be prevented in any way. However, there are exceptions to this rule which let you save an important NPC from dying by performing certain actions. We have described all such situations in detail in our guide.