Hi Cat Pat,
Thank you for reaching Microsoft Community and apologies for the inconvenience this has caused you.
May I know what is the make and model of the hub that you are using? Are you using the same hub model for both school and home, or they are different?
Just to confirm: When about to connect the Surface to the hub at school, the display is still fine but as soon as you connect the hub to the Surface, the screen automatically rotates itself upside down, correct? And since you are using an external mouse and keyboard through the dock, I assume you do not have a typecover connected to the device, right?
When the issue occurs, how about going to Windows Settings > System > Display, what setting does it shows under Display orientation? Is it on Landscape or Landscape (flipped)?
Please provide us also with the Windows specifications of the device (Edition, Version and OS Build). You can see those details in Windows Settings > System > About.
For now, kindly try first running these steps below then see if the issue persists:
1: Run Surface Diagnostic Toolkit
See: Fix common Surface problems using the Surface Diagnostic Toolkit (microsoft.com)
2: Check for Windows Update
Go to Windows Settings > Update & Security and select Check for updates
Make sure all updates need are installed including Optional updates
3: Run System File Checker Tool and DISM commands
Open Command Prompt (Run as administrator)
Type and enter these commands below:
DISM /Online /Cleanup-Image /CheckHealthDISM /Online /Cleanup-Image /ScanHealthDISM /Online /Cleanup-Image /RestoreHealthSFC /scannow
Note: Allow each command to complete its process before entering the next command line
Exit Command Prompt and restart the Surface
Kind regards,
Marrion