Indeed, your device's battery optimization settings could cause Pandora to stop in order to save power. Check these settings specifically for Pandora.