They don’t have the death penalty in Israel. There was a death ordered a while back and that was for Eichmann when he was captured by Israel. That was in May 1962! There have been none since then. The religious community in Israel is strongly against it. So ... you won’t get that in Israel.
“Terrorists and Spies should always be executed upon conviction. This would prevent future efforts to do a prisoner exchange, and may also deter people from entering this line of work...”
You’ll get no disagreement from me - especially when the spy in question is one of our own citizens.
For example, I cite as examples...
Robert Hanssen, Christopher Boyce, Aldrich Ames.
All three of them should have received the death penalty. I have no sympathy for traitors in our midst. I don’t care whether they did what they did for ideology or for money.
The threat of death may not deter all possible traitors - but it should deter a great deal of them.
It may occur to you that the reason they don't kill them is they may future trading value.