That looks like a nice way to train them,
how is one safely supposed to retrieve a gun from the shooter because they made it seem like it was possible.
fleeing from the scene instead of trying to stay hidden
Since a training video was posted, this merits discussion. First of all there is nothing nice about any aspect of this. Even just teaching kids to face this reality is BRUTAL! Nothing will change the fact that if you're facing an armed attacker there is a very real possibility you will get seriously wounded, or killed. Kids have been repeatedly confronted with this reality enough that folks are starting to be ready to do something.
Next, trying to hide from a shooter in a classroom amounts to nothing more than waiting your turn to get shot. That's no plan at all. The first point of any training is to recognize you are NOT helpless!
You asked "how is one supposed to get a gun away from an attacker because they made it look like it's possible." It IS possible! Not like you see in that video though.
First of all I removed your word "safe." There's nothing safe about any of this. Pulling a gun on someone is inherently unsafe. Having that gun pulled on you is even more unsafe!
Next, while everyone should be trained how to disarm the attacker, it's just as important to train that no more than the first 5 people there try to gain control of the weapon. Otherwise the kids just wind up fighting each other instead of being effective.
Kids always know who is the most athletic, and training needs to include this. The shooter would almost always enter through the door, which means the slowest runners won't be the first to hit him.
The fastest runners closing the distance to the shooter ASAP is the main thing that keeps casualties low. You also want that first wave to hit him all at the same time, there are no prizes for first place. This alone requires practice! They need to learn to run their fastest while arriving together. Then they need to learn to do this in their classroom.
Once you run smack into the shooter, there are specific skills to taking the gun away. Students aren't likely to simply overpower the shooter, so they should be taught other techniques. Hands have inherent weaknesses, and how to take advantage of those is basic to all self-defense. Again, these are valuable skills that stay with you your whole life. Moving the shooter's arms in some directions is easier than others. That needs to be taught. Grabbing the gun itself and moving it in some directions is better than others; that too needs to be taught.
Once these basic skills are learned, kids can practice them in twos, anytime. This can be good safe fun.
Teamwork needs to be taught. A group of five as first wave of attack needs to train together how to effectively control the weapon, reducing how many get shot. This needs to start slowly, with little resistance from the pretend shooter. That's what you saw in the video, slow, with little resistance. In that environment everyone stays safe, and learns what to do.
For this to work you need three waves of people attacking the shooter. First wave controls the weapon, second wave controls the legs so when the third wave hits the perp goes to the floor. That takes away his height advantage so even a large adult against small children, that third wave then has a big part in subduing him.
Everything about this is brutal, nothing about it is nice. Except you never get 17 people shot this way. That much is nice.
You probably get at least 3 people shot, hopefully less than 5. That's still brutal. Hopefully those are all just wounded, with none dead. That would be better than what we've seen.
The most effective part of this, in it's proper place, with everything else that can be done which starts with not letting perps get in the school to begin with, is DETERRENCE. If you know you're going to run into this much resistance, you probably won't try it. Even moreso where teachers and other staff are allowed to be armed! That'll always be more effective than just hiring armed guards, because kids wanting to go back to shoot up their old school can learn where those guards are and avoid them, attacking weak spots.