The Vincennes shot down Iran Air Flight 655.
As far as eliminating Hamas there are some positive aspects to killing off the original members and leadership, the original structure, what follows is rarely as good, and all the killing makes recruitment harder and less selective, if Israel really wipes out Hamas and their civilian support and the city, then that makes it harder for Hamas to get civilian support in the future.
You can still get terrorist members and still get civilian support, but when people see what happens to it all, they will try to avoid helping and would rather the terrorist group move somewhere else. People get skittish and less cooperative, sources dry up, and suppliers and networks grow more wary and expensive.
After Vincennes shot down a civilian aircraft it likely made the US Navy a little hesitant to make the same mistake again.
Then you have to ask yourself when was the time a U.S. Navy Carrier came under attack while at sea
Remember how many terrorists have we killed in Afghanistan and Iraq over the last 20 years, yet they seem to have no shortage of new recruits, they’re approximately a billion Muslims on the planet that’s a lot of potential recruits who are committed to the cause