@schouk IIRC you tried investigating the media hub and other ways to send the audio.
Now it looks like "solving" the issue with bluetooth was achieved by degrading the audio quality to allow it to be more fluid...
It was explained that when the phone is locked the processor is slower. Maybe the audio stream from spotify is too hard to decode in real time for the processor.
Bluetooth is known to have a lower bitrate so the audio stream is lighter than the original one.
My guess is that bluetooth requiring a lower bandwidth the processor is now able to process the audio stream in real time.
Or maybe downgrading the stream is easier than processing it through the audio output...
What I would try is to bufferize the stream to give some slack to the processor to produce a clean audio output. I hope this can help.
[Edit] Maybe it's just RAM usage restricting the buffer size hence leading to those audio glitches