fs.realpathSync.native(__dirname) - I've found the answer in this Vite issue - just after writing the essay in the question...
fs.realpathSync.native(__dirname)