The command 'play track $trackid' unintentionally also triggers the activate command, causing the Spotify app to come to the foreground. However, the activate command is intended for separate use and should not be automatically triggered when playing a track.
This bug exists since version 1.2.31.1205.