Running for about a week now and not a problem anymore its like it was never gone. I had 1 loss of keyboard when my power hit power saving % but came back after a disconnect and full charge, but I only plugged keyboard in when I seen auto rotate was working.
The above suggestion isn't hard and full recoverable so no loss trying.
Disconnect the keyboard through whole process.
First hit windows and goto the settings cog and windows update and security, click the pause for 7 days button and then go into advanced and turn off updates for other microsoft products and go back and into view update history and click the uninstall updates. Select each and uninstall them all.
Right click (touch and hold and release) the windows start button and select device manager, expand the firmware section and right click each firmware (except surface touch firmware) and uninstall device for the 5 of them and if theres a tick box tick it on any that offers it.
Then expand the keyboards section and remove and thats there (yes mine had 3 and sometimes 4 but only have 1 usb keyboard and it still works) or do as I did and right click them and update driver to something that 100% you haven't got to crash the driver so no conflicts (but if you do not wish to do this just uninstall them they will update back) then do same with mouse section.
Scroll down to sensors and uninstall the hid sensor collection v2
Scroll down to system devices and expand it and move down the list to surface integration service device and right click it and uninstall it.
Restart your surface ( I did and 2 button reset but whether it matters I dunno) once booted back up go back to your window update and release the pause and search for updates install everything offer and restart, once booted back up again check your auto rotate and if it is back working then plug the type cover back in and it should be back if it doesnt rotate don't plug the type cover in just leave the surface on charge and check it periodically for rotation.
Hope it helps as thats exactly what I performed to get up and running again. ✌