It's easy to tell people to leave...however
Where can 4 million people go?
And are they allowed to leave Gaza?
Not all
1.8 million people in Gaza are displaced simultaneously.
Let's face it, when we're talking about 'square footage', only a tiny percentage of the land-mass is under assault at any given time.
Where do they go?
Further south, towards the Egyptian border, or camped-out, in otherwise sparsely-populated areas to the west, or simply a kilometer or two up or down the road, until the fighting is over in their residential areas?
Anyplace where the shells aren't falling, or about to fall, for a few days, at best; anyplace where they can get a roof or tent over their heads, rations, water, etc.
And, let's face it, those obliged to flee temporarily can always count on their fellow Gazans for some food and water and a corner in which to sleep for a few days, right?
As to being allowed to leave Gaza, I have no idea, although I've heard differing opinions on the subject, and, I've heard, that it's not safe to publicly declare your departure, for fear of reprisals by Hamas against one's self and family.
Allowed to leave DURING a military action?
Not likely; otherwise, the Bad Guys could embed along with the innocents, and get away.
Frankly, anyone with an ounce of brains and two shekels to rub together should have gotten himself and his family the hell outta there years ago.
This is a *****-kitty, for those caught in the middle, but they're also the ones who voted-in Hamas and supported their Destroy-Israel agenda.
This is part of the consequences of that arrogance and foolhardiness, I believe.
I feel very sorry for them, the men, and especially the women, and, of course, and God help them, most especially, the little ones.
But I value the slaughter of Hamas operatives by the bushel-basketful more than some modicum of harm coming to those who voted those bastards into power in the first place.
This is war.