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
fflush(_f); in the