To this extent, I completely agree with you that extrajudicial killings are not justifiable in any way, neither in Shariah nor legally.
However, it is also important to note that I have mentioned Shariah as well. If someone takes a wrong action in the name of Shariah, it is not Shariah that is to blame, but the individual responsible.
Laws are not abolished because of their misuse; rather, those who misuse them are punished.