This isnt a gotcha. Israel does not recognize the legitimacy of the Palestinian state, but they don’t like, pretend it doesn’t nominally exist. If Hamas considers themselves a legitimate government, they can be declared war against. They’re not legitimate, but they still exist.
As an easy example in the US, everyone in the country doubted the legitimacy of the “Autonomous Zone” in Portland, and yet it very definitely was a thing.
This isnt a gotcha. Israel does not recognize the legitimacy of the Palestinian state, but they don’t like, pretend it doesn’t nominally exist. If Hamas considers themselves a legitimate government, they can be declared war against. They’re not legitimate, but they still exist.
As an easy example in the US, everyone in the country doubted the legitimacy of the “Autonomous Zone” in Portland, and yet it very definitely was a thing.