Hey, I think you should check the connection first as you say when you slightly move the cable, the disk becomes inaccessible from Finder. You can unplug your exFAT external drive and check the USB cable and the port. Then, try connecting the disk to another port on your iMac. If the issue still goes on, change a cable or you can use another disk for a test.
Besides, you can update your Mac as possible system bugs may lead to the external drive not mounting on Mac issue.
And you say you use the disk on Bootcamp and the disk is unmountable in Disk Utility, you can reformat the disk to fix the errors on it that First Aid cannot fix. Pay attention that reformatting will erase all data on it, you need to get off the files and then carry out reformatting. You can reboot your iMac to mount the disk to back up the data.