(Apologies for the crosspost in Contribution, but I didn't see this subforum.)
I posted this before but it went inactive.
This seems like a simple bug fix that people have been requesting for
2 3 years. (Lots of requests around the interwebs).
This is only a problem in Spotify Premium. I'm assuming the ads were keeping Windows awake. I'm not sure which is more annoying, the ads or this bug.
Updated on 2017-11-02
We’ve been exploring many ways of enabling customers to play music while the screen is off. Most of the solutions we had explored involved preventing Windows from being able to turn the screen off, which would result in a much higher degree of battery use—something that we don't want to do.
The good news is that a fix for this is in the Windows 10 Fall Creators Update. With this update playback on Spotify can continue while the screen is off to conserve your battery power. While you might not have this update yet, you can update Windows manually by going here: https://support.microsoft.com/en-us/help/4028685/windows-10-get-the-fall-creators-update. The music will, however, stop when your computer goes to sleep. You can control the sleep settings in the Power & sleep settings.
Please know our Desktop teams take your feedback very seriously and they’re excited to help fix this issue for you all. Thanks for continuing to bring us your Spotify Ideas.