The solution was, that I had to reinstall VS Code. I moved from the Flatpak version I was using before to the yum repository described on the official VS Code docs, where R is now recognized in the terminal. So it was probably related to the reduced permissions due to the Flatpak sandboxing.