Your argument seems to be: it's okay to do terrorist things if someone makes you. But that's still terrorism.
There's evidence many of them were killed by friendly fire, to avoid capture and the need for hostage swaps. See:
https://thecradle.co/articles-id/18526
https://www.oct7factcheck.com/oct7factcheck/Friendly-fire-Is...
I think the Hannibal Directive is not great, but at the same time the Israelis wouldn't have committed those acts had the terrorists not crossed into Isreal intending to do terrorist things.
It's terrorism whether you invade to kidnapp civilians or to murder them, and they're was plenty of civilian murdering happening that day as well.
Even if Isreal goaded them into doing it to justify genocide, it's still Hamas who decided to do the terrorism.