SDFS File::flush() and SD_MMC.flush() appears to do nothing
Both SDFS and SD_MMC implementations seems to have a bug that flush() doesn’t write data to the SD card.
Possible workaround mentioned by psykokwak-com
Edit file vfs_api.cpp and add fsync(fileno(_f));
after
fflush(_f);
in the void VFSFileImpl::flush()