Under The Geneva Conventions rules, if a church, mosque, school, civilian area, etc. is being used for military purposes it no longer has an exception from attacks.
It should be noted that Hamas says Israel has killed 10,000 mostly civilians. I doubt that number as they lie. Hamas says they are targeting civilians, and that is a lie. If Israel decided to target civilians the death toll would be in the hundreds of thousands.