Not sure what law you are referring to. Certainly the means used to kill someone on death row matters. They no longer electrocute and they certainly do not burn them alive.
There is no specific law to which I refer. It may be rooted in Common Law, but there is no case law that says the police can only defend themselves with guns. As for executions, yes that has been ruled on numerous times by the supreme court, but it’s also a completely different scenario. Self defense versus a contemplated execution by the State, in which the duty of the State is to not inflict unnecessary suffering. That logic has never applied to any self defense scenario.