The murderer’s mother may have had a electronic pass card/badge to get in the school. The murderer may have used that. No need to be buzzed in.
The obvious solution is to get rid of public schools and endorse home schooling.