I don't use VSCode so I don't know where the option would be, but what is your working directory for running from within VSCode?
When you run an executable directly (like clicking on it in explorer) the working directory is where the executable is. Your executable is at bin/debug/myproject.exe, so trying to load "arial.ttf" will look for bin/debug/arial.ttf.
Visual Studio defaults the working directory (when run from inside of VS) to the location of the .vcxproj file, which is really annoying since that won't be valid when you distribute the app to others. VSCode may be doing something similar.