At the end of the day, the barriers need to be able to open and close so you can't expect for them to not have gaps.
Whilst standing on a platform, an adult knows to expect a train going past. A young toddler doesn't, therefore it is down to the parent to keep the toddler safe and away from the the edge.
Same for level crossings. There are enough warnings IE barrier going down, flashing lights, and an alarm to warn that a train is approaching. An adult is able to understand this, a child is not so therefore it is, yet again, down to the parent to then keep the toddler away from the crossing.
There really is enough warnings (speaking from those I have ever been across anyway). It is the adults fault here for not gaining control of the dog and child before getting to the crossing. It's basic common sense.