Well, perhaps it will be instructive to talk about my kid's former high school. It was not a secure campus when she went there in the late 1990's. After some later violence that did not involve guns (Latino gang related) they built a secure perimeter, a seven foot tall iron fence with vertical bars about 3" apart, topped with sharp points. Metal detectors at every entrance, monitored by armed security guards, who were furnished by a private firm with a contract with the school district.
The violence was relatively minor, but drugs were a problem. After random busts by the SJ Police using drug sniffer dogs, there came a time when NOBODY was carrying through the gates, but drugs were still present on the campus. Packages were being left at the fence and picked up by kids who had passed the security check. So they added a morning perimeter check with sniffer dogs, and stopped that. Today the problem they have is drug deliveries via drones "bombing" the grassy areas of school grounds inside the perimeter. Not sure what the answer to that one was, as I quit caring enough to follow a few years ago.
There is nothing to prevent guns including AR-15's from being passed through the fence, at a pre-arranged time with 2200 students on the grounds between classes. The entire perimeter fence is monitored by camera, and you can see each fence section in a bank of monitors in the Admin building. But there is nobody whose job it is to watch the monitors continuously. The lone guard has rounds to make every hour. Even so, drones now exist (10 pound cargo, $800) which could deliver an AR-15 (six pounds) and multiple magazines (up to another 4 pounds). I know some of the kids have such, there are drone videos all over the neighborhood web page.
I don't know how you could prevent drone delivery of a weapon to the school campus. Whoever arranged such would have at least 15-20 minutes before the SJ Police arrived from the closest substation, and maybe 30 minutes for SWAT to arrive from downtown. An active shooter with an AR-15 could kill a lot of people in 15 minutes, and still escape campus. Cruz did all his mayhem in 6 minutes.
I find myself uncomfortable in even discussing such details. But like I said before, I know two teachers who are both ex-military, and both ex-cops, and currently have second jobs as parole officers for juvenile offenders. They each park 1000 feet from the HS and walk the remainder, and their time at the HS is the only time they are not armed.
Heck, although intended as a camera drone, you can also mount an AR-15 with a 30-round clip on a heavy lift drone:

I don't know how to make 2200 kids and another approximately 100 faculty and staff safe at that HS. Do you?