The Spotify desktop app for macOS breaks input source switching via the Caps Lock key. This is a checkbox found under System Preferences > Keyboards > Input Sources when you have multiple input sources installed.
This works fine when the Spotify app is not open. As soon as Spotify is running, Caps Lock reverts to normal Caps Lock functionality instead of properly switching input sources. Closing the app fixes the problem.
This is a significant issue, I essentially can't run the Spotify app at the moment. via Google searches I've seen anecdotal reports of this happening since as far back as 2015, surely there must be a solution by now?