Apple should jump ahead of the problem and allow schools to control screen time and focus modes.
A few years ago Apple blocked[1] some parental control apps because "they put users’ privacy and security at risk"
This actually came up with our school. They tried to use an app to control student phones but it was fundamentally limited by these Apple restrictions.
[1] https://www.apple.com/uk/newsroom/2019/04/the-facts-about-pa...
And really if we're talking about having to enroll a device into some sort of managed device system, schools don't have the time or manpower to manage tracking every kid's phone that is in the school.
And if we're talking about something you don't actively choose to enroll, we're back to my fun and games.