I was migrating files from an old Mac running Mojave to a new one running Monterey, using an external SSD formatted with APFS (encrypted), and noticed that there was some data being lost. I had created a .rtf file to note the files I'd copied, and copied that onto the external SSD too. It showed as being on the external drive in Finder, but when I ejected the drive and plugged it into the new Mac, that file was missing. I repeated the process again, recopying the file from the old Mac onto the external drive, then copied some more files, and then edited the .rtf file. When I ejected the drive and plugged it into the new Mac, the .rtf file was there this time, but the latest edits where missing! Yes, I am ejecting the drive correctly using Finder, and not simply unplugging it.
Has anyone had similar problems, and found a solution?
I assume it is caused by macOS not flushing file buffers when you eject the external drive. I've never noticed this problem before, but in the past have always used spinning disk external drives, and never formatted with APFS. So I don't know if it is related specifically to APFS, or specifically to Mojave or Monterey.