Hi oussama,
Welcome to Microsoft Community, Thank you for reaching us. We apologize you are getting this problem on your Surface Pro 7 Plus. Possible reason it might affect the roll back of the driver or updating the recent driver.
But don't worry rest assure we will give our best to help you with this problem.
Please follow this technical steps to fix the issue:
SURFACE DIAGNOSTIC TOOLKIT (CHECK DIAGNOSTIC)
If you don't have SURFACE DIAGNOSTIC TOOL KIT yet
please download this in Microsoft Website.
Open any browser
Ggo to "https://apps.microsoft.com/detail/9nf1mr6c60zf?hl=en-us&gl=US"
Download and install the "Surface Diagnostic Toolkit"
Once install launch Surface Diagnostic Toolkit app
Run full scan (It will automatically start scanning your Surface pro for Hardware and Software driver issue.
Once update is completed restart your Surface 7 Pro Plus
Check if Auto rotate is working
If still did not help follow next step
CHECK STATUS IN UEFI
restart your Surface 7 Pro Plus and press Volume Up + Power to enter UEFI.
Once your inside UEFI mode check for the "Device Configuration, Sensors.
Save and Exit
Check if Auto rotate is working
If there’s anything more you’d like to share or questions, please don’t hesitate to reach out.
Warm regards,
Jansher Liwag
Microsoft Community