I also haven’t had this problem.
But then again, I don’t use MacOS…
Anyways, next time this happens, use
dd or similar to create a file from the SD card blocks, upload to google drive and share a link with me. Like I said; if I can reproduce it I can fix it.
If your solution involved formatting the SD card, then the problem may also have been SD card corruption, which seems like a fairly strong contender for this bug. We already know that MacOS likes to fiddle with the filesystem a lot, so if you have mass storage on while doing uploads, it’s easy to end up with a borked file system, and it doesn’t seem too far-fetched for a borked file system to behave this way.