I understand how frustrating it can be to have Spotify stop playing when switching users. Unfortunately, this is a limitation of the Spotify app and there is no built-in solution to keep the music playing.
However, there are third-party tools that you can use to transfer your Spotify playlists and songs to another account without interrupting the playback. One such tool that I would recommend trying is Musconvtool.