Netanyahu has a deadline. He is facing a snap election. If the Knesset doesn't pass a budget by March 31st, Israel votes 90 days later, and Netanyahu is not expected to win. Worse for Netanyahu, he's on trial for corruption charges, and once he's out of office, he's probably headed for jail.
The war was intended to give Netanyahu's popularity a boost, but that did not work out.
[1] https://www.reuters.com/world/middle-east/netanyahu-seeks-av...