Hi Clara,
Welcome to Microsoft Community.
I'm Hahn and I'm here to help you with your concern.
In Windows 11, it automatically detects the connection status of the device and keyboard and intelligently determines whether to turn on tablet mode. If it switches between tablet mode frequently, you may have a faulty connection between your screen and keyboard.
You can try the following methods to troubleshoot:
- Clean the keyboard connectors: Dirty connectors on your keyboard can cause problems with attaching or detaching and may cause your Surface Book to stop responding or crash.
- Force a shutdown and restart your Surface: Force a shutdown and restart your Surface - Microsoft Support
- Run the Surface Diagnostic Toolkit: Fix common Surface problems using the Surface app and Surface Diagnostic Toolkit - Microsoft Support
- Reset using the most appropriate choice. If you've tried basic troubleshooting options, you may need to restore or reset your Surface. If the issue occurs after a reset, then the root cause is very likely hardware related. Restore or reset Surface for Windows - Microsoft Support
If the problem is not resolved, there is likely a hardware problem with the Surface device. How to get service or repair for Surface - Microsoft Support
I hope this helps. If there is anything not clear, please do not hesitate to let me know.
Your Sincerely
Hahn. W - MSFT | Microsoft Community Support Specialist