Hi HM,
Thanks for reaching out to the Microsoft Community. From your description, it seems the Surface Pro 8 keyboard works when connected normally but not when folded back and magnetized.
Could you confirm whether the keyboard consistently fails in that position, or does it occasionally reconnect or show signs of detection like a sound or notification?
To begin troubleshooting, please download and run the Surface Diagnostic Toolkit. It will automatically scan your device for hardware, software, and firmware issues. Also, check for any pending driver updates via Settings > Windows Update.
Please let me know what the toolkit finds.
Warm regards,
Edward Schlobohm