The accepted answer did not work for me. This did, credit https://github.com/microsoft/vscode/issues/239844#issuecomment-2705545349
Right click on the svg file in the sidebar
Open With...
Configure default editor for "*.svg"
Text Editor (built in)
Now I can actually read svg file code again.