Set Check and Correct Spelling Automatically in Settings on your macOS. That should work for all apps, even browsers and Electron. I personally switch that off as Auto Correct is fundamentally flawed since the OS doesn't know what context it is, nor what language(s) you are typing.