- The file on the v4.1 tag has 89 lines of code (see esp_vfs_dev.h).
- The file on the realese/v4.1 branch has 127 lines of code (see esp_vfs_dev.h).
The v4.1 branch basically contains an intermediate state towards the next maintenance release (probably v4.1.1). So it has not been officially released. I would thus argue that the current PlatformIO package is correct and that the OP will have to wait for the next official release.
It should be possible to switch to the tag v4.1 in Espressif’s GitHub and the navigate to examples that are compatible with the official release.