Might not be a coincidence:
–
Go to System Preferences > Network > Location - Wi-Fi setup for your school Wi-Fi setup, and write down every detail of that setup.
When not at the school, you might completely disable and delete/remove your existing System Preferences > Network > Location - Wi-Fi setup . . . then Quit everything and Restart your Mac.
Next, when you return to the school, set up a new Wi-Fi connection.
Alternative: Set up a new Wi-Fi connection - as much as you can - BEFORE returning to the school . . . and then complete the setup and connection, when you return to the school.
–