So this happened to me and assuming I got it back up in running, I guess it's fixed.
Items: MacBook Pro (13-inch, M1, 2020) (Big Sur version 11.3)
Samsung 860 EVO 1TB M.2 SSD
M.2 SSD Enclosure (houses the Samsung 860 Evo)
USB Type C to Micro USB 3.0 (adapter cord to connect extSSD to USB-C ports on MAC)
USB Type C Hub Adapter/ USB-C dock
Beginning:
I formatted a new external SSD (Samsung EVO 860) to work on M1 MAC Pro (Big Sur v11.3). I used Disk Utility to erase and format SSD into APFS so MAC can read-write to it. During this process, a USB-C dock was used. Power and mouse are the devices connected to USB-C dock. Formatting to NFPS completed properly.
While extSSD connected to USB-C dock, I conducted a test by copying large video files. Two minutes in, I stopped the process normally, canceling using the dialog box, as it seemed that the files were copying properly.
Issue Begins
I removed USB-C dock and connect extSSD and power cord directly to Type C ports on MAC.
I resume copying files to extSSD, and during copying;
MAC gives error "The operation can’t be completed because an unexpected error occurred (error code 100006)"
Finder gives error "Disk Not Ejected Properly Eject "Samsung Evo 860" before disconnecting or turning it"
ExtSSD disappears from Desktop (Prior to removal of USB-C dock, I didn't properly eject extSSD. Crap, I may have corrupted the drive!)
Troubleshooting: (Without USB-C dock attached)
Unplugged and plugged. MAC recognizes drive. Restart copy. Same errors from MAC and Finder. ExtSSD disappears.
Used Disk UtilityFirst Aid. Restart Copy. Same errors from MAC and Finder. ExtSSD disappears.
Used Disk UtilityErase (All other formats are available except APFS, weird). Opted for Mac OS (Extended) Journaled format. Restart copy. Same errors from MAC and Finder. ExtSSD disappears.
Removed extSSD from MAC and plugged into Windows 10 laptop. Used Disk Cleanup to format extSSD with no file system.
Removed extSSD from Windows, plugged into MAC, and format drive to use on MAC.
AFPS file system is now an available option to use. File system APFS format complete.
Restarted Copy. Same errors from MAC and Finder. ExtSSD disappears.
At this point, I'm thinking this extSSD is bricked. Done. Kaput. Then I had an odd idea. Why don't I just set it all back up the way it was.
Solution:
Attached USB-C dock to MAC. Connected extSSD (with APFS file system) and power supply to dock.
Restarted copy. All files transferred without errors.
I'm assuming this issues has to be about voltage. I have been reading about SSDs becoming bricked due to power outages. I think by interrupting the file system by improper ejection of SSD can damage it. I say things better in my head then typing it, but I hope this helps someone.