Whilst I don't think Netanyahu wanted Oct 7th massacre to happen, it was a gift for him, politically, and he will spin this war out for as long as he can to preserve his position and achieve his far-right aims.
How long that will be depends on how much actual support he has in Israel v outside pressure. The IDF abuse, structural indignities in the West Bank, the strength political far right Israeli parties - none of this happened in a vacuum. In the same way we know there is some support for Hamas ideology inside Gaza, there is the same for Netanyahu.
I'm really worried about Gaza being preserved as a Palestinian enclave.