You seem to be arguing from a bizarre perspective that Israel is the defender here. In reality, Israel is the aggressor, and Palestine is the state that has been under occupation and illegal blockade for decades. October 7th was an (illegal, abhorrent and criminal!) act of retaliation against previous Israeli aggressions, not an unprovoked attack. If Ukraine were to bomb a Russian city during the current war, no one would views it as legitimate for Russia to bomb a Ukrainian city back: Russia started the whole conflict and is expected to bear the consequences, until such a time as it stops the occupation.
In general, the overall solution would be for Israel to allow Palestine to be an independent state, recognized in the UN, with full control of its own borders. It is fully within its rights to keep its border with Gaza closed, of course, but there is no right whatsoever to blockade Gaza's access by sea. There is also a good argument to be made for paying reparations to Palestine for the occupied territories and for the entire illegal blockade duration - though that is ultimately secondary. The thornier question is of course how to connect Gaza to the West Bank.
In general, the overall solution would be for Israel to allow Palestine to be an independent state, recognized in the UN, with full control of its own borders. It is fully within its rights to keep its border with Gaza closed, of course, but there is no right whatsoever to blockade Gaza's access by sea. There is also a good argument to be made for paying reparations to Palestine for the occupied territories and for the entire illegal blockade duration - though that is ultimately secondary. The thornier question is of course how to connect Gaza to the West Bank.