So the supreme court already ruled the president cannot be held accountable for anyone they kill.
The vice president becomes the president instantly if the president dies.
What is preventing any vice president from waiting until day 1 of their parties presidency, and then murdering the president? And then instantly pardoning themself?
That’s not what the Supreme Court said, though. Only official acts have absolute immunity. Murder is not usually an official act.
And as always, if you’re talking about a coup d’etat, the question is if the military or spy agencies will kill you before, during, or after it. When the rule of law is out the window, you must expect physical violence.