Let's get one thing straight.
The Gazan Arabs who sought to murder the Jews through breaking into Israel over the last several weeks were not "demonstrators." They were not "protestors." And they were certainly not unarmed.
In fact, many carried knives, hand-axes, cleavers, guns, and Molotov cocktails.
They also flew kites with Nazi swastikas attached to incendiary devices for the purpose of burning fields and crops and houses, if not people.
They were the aggressors and they had murder in their hearts at the very idea of recognition of Jewish sovereignty.
Hamas even provided instructions on where the weak points of the barrier are, where the nearest Jewish villages are in reference to those weak points, and how to carry out the murder and kidnappings of Jewish civilians.
So, yes, the IDF was very restrained under such circumstances.
Nonetheless, Hamas wanted dead Arabs to parade before the world for the purpose of delegitimizing the Jews and they got it.