Hamas is now the elected government of Palestine.
It's one thing to say that a military force should not seek refuge among a civilian population but an elected government must necessarily be close to the population they serve. Hamas provides welfare stipends and food rations to the poor, police protection and medical services to Gaza at large, management and salaries for tens of thousands of civil servants and manages a smuggling/distribution system that brings consumer goods and currency to blockaded Gaza.
If the government is in a defacto exile, secluded to the country side - the suffering of Palestinians would only increase.
Another point I'd like to illustrate is the fact that Israel is not only assasinating high ranking Hamas officials and incurring colateral damage on the way. They are targeting civilian infrastructure e.g. bridges, power generators, graineries which they claim is focused on destroying Hamas' capability to fight back. This is standard procedure in an Israeli invasion. Look back to the last invasion of Lebanon where they bombed all of the ports and powerplants. Most collateral damage occures when the IDF hits these targets.