This type of actions are done on purpose to blurry the line between civilians and army so no one knows who is who. Everyone is paranoid so hamas kills more civilans, so Israel government can kill more civilans in retribution. Over all, Isriaelly goverment will win, since they are backed by US and they will take over all the land from Palestinians.
This is how Trump won in the first place, wikileaks published emails of Hilary’s campaign doing this. Instead of critisizing her for being responsible for Trump, democrats blamed Russia and attecked Wikileaks as Russian spies, literally called for shooting the messenger.
This is a prime example of why voting for lesser evil is not a tactic in politics and the whole liberal ideology as whole that we just need to vote for right people, instead of removing powerful positions in government in the first place.