1. It destabilizes the country you are waring with and upsets the command structure in such a way that you have no one to negotiate with when looking to end hostilities
2. Typically a head of state is a non combatant and targeting them is against the Geneva convention, Hague convention
3. Heads of state do no not assassinate other heads of state as it opens the door to retaliation. World leaders do not want to exist in a world where world leaders are constantly being assassinated
4. The US has Gerald ford's executive order 11905 (and subsequently 12036 and 12333) that reorganized the CIA and outlawed assisination, though this has been broken to kill generals, it hasn't been broken to kill a head of state by the US. Remember Sadaam was tried and hung by his own people.
5. You have the Protected Persons Convention, an international directive meant to protect heads of state and diplomats from the mid 70s. A host of Xfiles talked about diplomatic immunity, which is a direct result of the PPC
It's an international norm to not kill another head of state, its in some international law, but all treaties and norms are temporary so if you've got enough of a big swinging dick in international affairs or you're at war with what is deemed a criminal state you can get away with it. Remember if you want to do a war crime, just win the war and historically you're pretty untouchable.
Regardless I'd call it bluster. Bibi wants the ayatollah to know they can kill him and have him bend the knee. That's a much more preferable outcome to actually decapitating the Iranian head of state and possibly stoking a regional civil war and a host of revenge attempts on the Isreali Prime Minister.
The reason you don't kill other heads of state is the same reason you don't hear football coaches say "the other guy I just beat is a retard and his team is full of pansies" in post game interviews. Every head of state is going to be unpopular at some point and every coach is going to lose a game. You don't want a scorched earth policy to rule the day, and you don't want to set mortal precedents that can be turned against you.