The unfortunate reality is that Islamic terrorists have no problem using, and sacrificing the lives of, children. If you are an IDF soldier, you have to be aware of the fact that women, children and really any and all civilians are potentially going to detonate in front of you or pull out a gun and end your life.
And yes, bad things happen in war. There are very unfortunate incidents, like IDF killing their own people who were only looking for help. Again, IDF cannot trust anyone in Gaza because any of them could potentially end your life.
Those incidents are very obviously the exception and not the norm. The definition of genocide, as was discussed previously, is that there is intent. Clearly, despite the accidents and mistakes, IDF is not intent on killing civilians. It's obviously the opposite.