Deif was killed before Nasrallah
it seems Nasrallah was moved between a few known locations rather than randomly moving between new places on the battlefield like Sinwar, and Hezbollah suffered an absolute intelligence breach so Israel knew where he was for years and had planned that attack in advance
when you build a massive underground compound dozens of metres underground, you will probably stay there during a war thinking you are safe rather than taking the risk to move to new random places, that doomed Nasrallah. remember Nasrallah was secretary general (a political role), not a military leader like Deif or Sinwar, so he didn't need to be on the battlefield