So I was having this problem and I think I've solved it.
Go to apps, click on spotify, then battery, and click allow background battery.
Working relatively seamlessly for me now
Allowing background activity for Spotify on its own did not work for me. I had to amend Power mode to High Performance. The combined actions worked. Also if Spotify is not in offline mode with saved music then you will obviously lose the track you are listening to when the phone loses connection, apparently this is the case even if the playlist is one of your saved lists.