This is a stupid mistake.
Make sure that in launch.json, the value for cwd is correct and is pointing to the same folder as the DLL of the .NET Core app.
By default current working directory is set to the workspace directory, the appsettings.json file is not there, thus when running the app, it doesn’t have any settings.