It's IDF that is putting Palestinian civilians in danger by shooting at them instead of Hamas.
Just off the top of my head, it seems to me that a more civilian-sparing tactic would be to go in, doorknock, identify Hamas members, arrest/neutralize them. Spare the civilians.
Especially considering that IDF/Mossad seem to know exactly which houses have Hamas members inside them.
But nah. IDF won't do that because the are genocidal cowards.