They... don’t. The ICC sought warrants for both Israeli and Palestinian leaders (at least one of the Palestinian leaders was subsequently killed by Israel, rendering any charges moot, but the ICC wasn't ignoring the alleged crimes.)
Similarly, many countries have sanctioned both Hamas (and/or other groups like PIJ, etc.) and/or individual Palestinians for acts against Israeli civilians as well as Israel and/or Israeli politicians for acts against Palestinian civilians.
Similarly, many countries have sanctioned both Hamas (and/or other groups like PIJ, etc.) and/or individual Palestinians for acts against Israeli civilians as well as Israel and/or Israeli politicians for acts against Palestinian civilians.