The fact that the Pi connects OK on the school network and not the Arduino make me think it could be that port 8442 is closed on that network, as we use that for Arduino but not Pi. I’m not sure if this meshes with the behavior where you see it connect for a split second but it’s worth checking.
See this post for instructions on how you can test to see if port 8442 is open on that network, and let me know if you have any questions.