That doesn’t give the IDF free reign to attack them but it does mean that under international law they are not doing anything illegal
International law requires that each strike needs to be analysed individually for balance to check the potential impact on civilians and that Israel minimises the number of casualties
Israel is doing so through: Targeted precision strikes, warning civilians to leave, using military lawyers independent of the IDF to ensure laws are being followed
Hamas is likely to overinflate the actual numbers. But by simply comparing body counts, this also doesn’t take into account how many were Hamas terrorists
For context, according to UN statistics, the average civilian to combatant killed ratio in al lconflicts is 9 civilians for every one combatant. Israel’s civilian to combatant ration is generally much lower