Hi Sarah Z1,
Thank you for reaching Microsoft Community. We're sorry for the trouble this has caused you.
I understand that you're having trouble with your Surface pro 5th in which the SD card disconnects randomly. I am here to help and let us work on this together.
It's possible that the SD card driver is the only problem here. To troubleshoot, kindly follow these procedures, then check to see if the problem persists:
Force the device to shut down and restart.
Press and hold down the power button until your Surface shuts down and restarts and you see the Windows logo screen (about 20 seconds), then release the power button.
Run Surface Diagnostic Toolkit and check Windows updates including optional updates available.
See: Fix common Surface problems using the Surface Diagnostic Toolkit (microsoft.com)
To check for updates: Go to Settings >> Update and Security >> Windows updates >> Check for updates. For optional updates, click Advanced options then select optional updates.
Run the system file checker to check if there are corrupted system files that are just looping around causing this kind of issue to exist. See Using System File Checker in Windows - Microsoft Support.
Update drivers and firmware
Check what is the current OS Build of your Windows version. On the search box type Winver and hit the enter key.
Go to Download driver and firmware for Surface, choose Surface Pro. Then click the link next to Surface Pro 5 then click Download on the next page. Choose the .msi file that matches your current OS Build and click Next. After downloading, run and install the .msi then Restart.
I hope these helps. Let me know how it goes.
Kind regards,
Lavenia