I despise Hamas, but this claim is disingenuous propaganda (by the leaders who make it, not the parent who repeats it):
First, Hamas is 'notorious' for it because it's endlessly repeated by their enemies. That rhetoric doesn't make anything true. (Haven't we had the Internet long enough that people know it well by now?)
Second, Hamas is an assymetric, irregular force, and assymetric forces cannot operate bases or fight open battles anywhere; they all must blend in with civilians (or hide in wilderness); it's just the nature of being that kind of force:
They have personal weapons, mostly. They cannot bring their rifles and RPGs to fight a fully capable modern state military's tanks and planes on an open battlefield - would you? The modern state military would kill them all immediately; it would be pointless. Might as well surrender.
Therefore the assymetric force cannot hold ground, and therefore cannot build bases separate from civilians: If they had identifiable bases, the state military would erradicate them in minutes.
The laws of war require militaries to distinguish soldiers from civilians, but I wonder if that is written by 'symmetric' forces and to their advantage. For assymetric forces, they might as well have bullseyes on their uniforms.