Yep, Israel has a simple solution.
it is difficult for outsiders to enter an Israeli school. Most schools maintain only one unlocked entrance that is typically staffed by an armed guard.
Unlike USA, where FBI has prior knowledge of unhinged shooters, but still ignores all the red flags to make political appointees look good. Most "security theater" in USA would be consider joke in Israel. But the notion of "rights" is such a big deal, you can't actually target anyone (especially the suspicious) w/o being sued.