This is not true of Bibi. No law limits how much he can serve. The only legal block for him remaining in power is that he's undergoing various criminal trials, which may or may not end with him being found guilty.
There is, of course, a lot of pressure for him to resign or for various other things to happen that he is currently managing to put on hold due to the war, but that's legal, and doesn't require wartime.
Absent all that, he faces elections in 2026.
leptons
It is true of Bibi that he should be in prison instead of leading Israel, for many reasons. There's speculation that he knew about Oct 7th before it happened, and let it happen so that he could maintain his power. Now it's war with Iran. I'm really not sure how far he would go to stay in power.
There is, of course, a lot of pressure for him to resign or for various other things to happen that he is currently managing to put on hold due to the war, but that's legal, and doesn't require wartime.
Absent all that, he faces elections in 2026.