This may have changed in a recent update, but as of September 2025 you can go to the Variables pane in the Run and Debug sidebar, right-click the variable you need, and select 'Copy Value'. This will copy the full value of the string to the clipboard rather than the truncated value shown by the UI.