I was with Biden. I would've stayed out of Gaza as a military force and sent Mossad out to do some targeted assignations behind closed doors, whilst I asked the US or Saudi Arabia to negotiate on behalf of Israel for the release of hostages. The smart method (in my opinion) was always to make Hamas look like terrorists and to offer the Palestinian people a better option. That option, as I think you've identified is a two-state solution.
There's a caveat to that though, it would only be available for discussion by Israel upon return of all hostages and with a year of total cease fire. Every time a rocket is fired into Israel, the clock begins again and the 365 days begins again. The Hamas leadership would probably not last a decade under such conditions, with the promise of potential peace and an alleviation of suffering being tantalisingly close, once the year has been achieved the Saudi's could provide significant infrastructure and governmental oversight, under a bilateral security arrangement with Israel.
Netanyahu won't go for this, because (as previously explained) the man is an arse and has a vested interest in maintaining his own position.