Can we start by locking the doors and having simply a secure, controlled entry point(s) to our schools? Seems to be a common practice used for securing just about anything.
I can't speak to the schools that have had shootings, but every school my kids have attended/currently attend, has had this in place (at least in theory). When visitors come to the school, there is one front door. You have to push a button and talk to a person in the main office to get buzzed in. Pretty sure they all have security cameras that allow the office to see who is standing out there prior to entry.
However, there are a lot of holes that can be exploited.
When kids are being dropped off in the morning, they have to walk by an armed officer on the way in, and most of them enter through the same entrance.
But, when kids are dropped off early (like for band/orchestra/drill team etc), there is no officer on duty yet, and some of them enter through different entrances that are unlocked. (i.e. the band room has its own entrance).
There are multiple exits, that are not alarmed. If someone bangs on one, teacher/students will open it to let them in, without asking questions.
At certain times of the day (i.e. lunch), a lot of kids will use those exits. If a shooter wanted to, he could just wait for one of those doors to open, and carry his weapon into the building, completely bypassing security.
My kids' HS has about 10 different buildings. I'm pretty sure that only the main building has a locked door that visitors have to be buzzed through. The other 9 buildings are unlocked, and kind of have to be since the students are going from building to building between classes and only have a few minutes to get to their next class.
Locking the front door seems like an obvious fix, but it is one that will be easily bypassed by a motivated shooter. In the case of the Santa Fe, Texas shooter, he wore a trench coat to school every day. Without metal detectors, he would have walked right in with the 2 guns under his trench coat, and no one would have given him a second look.