Suppose Sanders is elected president and then assassinated early in his first term by someone who declares his intention was to prevent Sanders from enacting his policies...
Further suppose that you yourself are a prominent nation politician...
Would you see it as in your best interests to enact at least some of Sanders' policies? After all, if you allow the assassination to stop the enactment of his policies, wouldn't you be encouraging future assassinations?
No. Assasinations as a form of terrorism are ussually highly ineffective in achieving their political goals. The President of the United States is only the public figure head of a much larger government bureaucracy which has interests of its own. Leaders are only a very small part of the picture, and the public face of a political infastructure. If you take Obama for instance, he is just one man- no matter how popular he was, no matter how much he promised change in 2008, he could not "will" such change into existence. political realities and interests exist independently of whether we want them to or not. that includes whoever is sitting in the Oval office. they can't change the world but they can make changes that are already happening that little bit easier or smoother or faster. In retrospect, if often seems like they are largely pushing at open doors even though at the time it can appear to be more decisive.
Assuming Sanders were elected, he would not be a lone figure head. The only directives that would be enacted by the US government as a bureaucratic entity would be the ones they largely agree with or accept. various forms of "passive resisytence" can slow down the process of reform, as the people who work within the institutions try to preserve the status quo. he would have his share of the government bureaucracy which share his views and ideals. Most probably the Vice President, as the one next in the line of succession would continue to enact some of the policies which it was in their interests to do in the first place. Assuming that the "incidient" was massive enough and the line of succession went as far down as a Republican, even they cannot totally change course. The same goes if it were Trump as President and was assasinated. he is only a figure head- and there are more people who would take his place or push for his policies.
If anything Assasination actually encourages more conservative reactions. it can be argued that the assasination "proves" the country "isn't ready" for policy X. In the Mid 19th Century Alexander II of Russia was assasinated by a bomb explosion, whilst he was on his way to give a speech that would announce the beginning of a Duma or an elected representative chamber (ironically one of the demands of the assasins). it wasn't until the 1900s and massive unrest that Russia did get a Duma and some constitutional restrictions on the power of the Tsar.
late 19th century assasinations by Anarchists in Europe of various heads of state didn't change anything either, other than tarring anarchism as moustached bomb throwing nut jobs. Communists didn't use terrorism as a tactic until much later in the 60's, 70's and 80's, and it didn't work either.
Even the policies enacted after 9/11, which is much more dramatic, only realised the latent neo-conservative and authoritarian predispositions of the Bush administration. That there was limited opposition by the Press and the Democratic Party in Congress only underlines that it was still in their interests to largely go along with it. loud cries of moral outrage make headlines but achieve absolutely nothing. Obama and the Democrats have continued policies of NSA mass survialliance and retriction of civil liberties, continued the war in afghanistan, kept guantanamo bay largely intact, and "ended" the war in Iraq by handing part of it over to private defence contractors. Ironically, Al Quieda largely succeeded in their goals because they didn't want to US to listen to their demands; instead they wanted a disproprotionate over reaction that would lead to military involcvement in the Middle East that would unite Muslims behind a radical Islamist adgenda, as well as bankcrupting the US government. Terrorism in that instance was pursued for propaganda purposes- getting the West to push the radical jihadist message by behaving as reckless imperialists.
The Reichstag Fire in Nazi Germany, regardless as to who did it, only provided an oppurtunity to pass the enabling act, giving the then Chancellor Adolf Hilter extraordinary powers in a time of national crisis (as had already occured under his precedessors a few times in the 1920's and 1930's). the Death of President Hindenburg later on was what meant that the powers of the Chancellor and the President were combined into the rule of Furher. Assuming one of the many assasination attempts had succeeded, there were others who could have taken his place and enacted similar policies.
The JFK assasination, again- regardless of who did it- didn't lead to major changes in policies but a continuation of the build-up in Vietnam. There are alot of "what if's" that Kennedy might have taken a different path towards ending the Cold War, but there was almost certianly going to be huge opposition behind closed doors as the disgruntled military was already pissed due to the bay of pigs and the fact the US didn't go to war over Cuba.
The Kirov Assasination in the USSR, laid the ground work for Stalin's purges. Stalin didn't need much encouragement and may have had a hand in the assasination itself.
Even if they killed Sanders- the policies would remain largely the same because he is only one person. the institutions are much bigger than him, even as President of the United States. Unless there were a military coup or popular revolution, the state remains largely intact and carries on much as it would do as before because it was already in its interests to. Assasinations or Terrorism are dramatic, but don't generally have much effect.