I got tired of my playlist stopping every time I left the app, so I created a Firefox add-on for my Android phone. It works fine for me, so should anyone be interested, try it and if there are issues let me know.
It keeps YouTube and YouTube Music playing when you switch to another app or go to the home screen, and it moves your playlist or mix on to the next video or song.
It’s free and open source (MIT), doesn’t track you and needs no account. The code is here if you want to check: GitHub - lagudafuadtosin/plays-on: Keeps YouTube and YouTube Music playing in Firefox for Android when you switch apps, including playlists. Built on Video Background Play Fix. · GitHub
Add-on: Client Challenge