in a democracy. there is no need to kill.
in a tyranical authoritarian system, yea the leader should be shot if he aint willing to leave voluntarily
I guess for the second scenario you mentioned an example would be al-Gaddafi. The people killed him and given that he reigned over Libya for over thirty years suggests that he probably would have never stepped down without the revolution (that in the end didn't change much to date). Hard to tell when and if death is justified, but I guess everyone would agree that it is essentially pointless to let people like Hitler have a fair hearing in front of a court.
when a tyranical authoritarian leader is leader. even a court within his realm wont work. because he owns the court system too.
obviously if he steps down voluntarily. then yes arrest him and send him to interpol and detain/charge him under international laws and court system outside of his homeland.
take Saddam Hussein. US invaded iraq in march 2003 and saddam ran away, basically losing his leadership by going into hiding.
months later when being found, he was arrested and imprisoned by the US
then later in 2004 passed back to iraq when the US thought that iraq had a new more stable government..
..but what if iraq didnt have a new government, where by the US didnt help in the initial capture and imprisonment or the later political change, whereby the new government didnt leaned more towards western policy.. he may not have been executed
after all while in US custody it was complete silence. but when in iraq custody he was publishing propaganda
this is why in the UK if you live in one town you are usually taken to a court in another county/town to be judged by individuals without personal bias/local affiliation to the person being prosecuted