Lately the music on my Huawei P10 Lite always goes off when the screen goes off, but it turns on again when I press the button. But only if I have headphones in it
Mobile: Hauwei p10 Lite
Music App: Spotify
Headphones are from JBL, I do not know the exact model
Like you, I can only google.
It is often the case that either a power saving option / battery setting is set too aggressive or some "smart assistant" pauses background applications, which you can disable. Maybe there's something to help you.
I'll check it out, I have the normal energy-saving mode, but that does not always happen