When the VS Code setting moon.binPath starts with a tilde (~), then Workspace.findMoonBin method mishandles this path as it treats it as a "regular" relative path and prepends a root path to it.
For example
~/.proto/shims/moon becomes /Users/patrik/projects/foo/~/.proto/shims/moon