I found another thread that sovles this problem:How do set Julia version in VSCode when using juliaup - #13 by fredcallaway.
You can set the julia version with juliaup override set ....
and then use the juliaup instance of julia /home/.../.juliaup/bin/julia
in vscode by setting the julia.executablePath
in VC code. Then the folder override will be used by vscode.