Write now the only way to get the system file path for a file / note is with app.vault.getResourcePath() and then process it. I use this JS to do so (created with the help of GPT 4):
let filePath = app.vault.getResourcePath(app.workspace.getActiveFile());
filePath = decodeURIComponent(resourceUrl.replace(/app:\/\/[^\/]+\//, '/').split('?')[0]);
Proposed solution
There should be a function like app.vault.getFilePath() to do the same thing but more concise.
I just tried let filePath = app.workspace.getActiveFile().path; in the console and it appears to only shows the path in the vault, not the whole OS file path. Does it work for you?