d_buster This has to have happened in the last couple weeks on an update or something but I was able to play Youtube music with the phone locked, just checked and the music stops as soon as you lock the phone. Why? this was an awesome feature that I loved using.
Novalissoide d_buster Settings > Sound and vibration > Media > Show media on lockscreen Is this toggled ON?
Psyonico Not a Graphene issue, I just tried and was able to listen to music on my lock screen. Did your YouTube premium subscription expire? I know that prevents having videos play on locked screens, not sure about music.
VehicularClatter298 This doesn't really answer the question, but why don't you give a try to some InnerTune forks like Metrolist (also available from the IzzyOnDroid F-droid repo)?