If you copy from Visual Studio Code on the Mac and past it into Evernote it pastes correctly with full colour, formatting, indenting, etc.
But if you paste it into a Code block in Evernote the formatting is terrible. By default everything is has double lines (a blank line between each line) and the indenting disappears completely. If you paste with "paste and match style" you at least get rid of the blank lines, but the indenting still disappears.
If I copy the text to something else (Outlook, Word, etc) and then paste it into an Evernote Code block it formats correctly.