Since Nougat, Power saver causes streaming to shut off.
I found that if you remove the particular app like Pandora or iHeartRadio from the optimization list then the music will keep playing. My best guess is that when the app is moved from optimized to not optimized the battery optimization will not suspend it's processes in the background. 

To do this go to Settings->Power->Battery optimization

From the drop down menu at the top select all Apps

Find the app you want and tap on it. From the menu that appears select Don't optimize and tap done.