YouuTube Red — but this requires a $10/month subscription and apparently, it’s only available in the US.
Firetube, Audio pocket, Pop video player — they don’t work very well.
OG YouTUbe, Xposed module — this requires root and signing in with your YouTube credentials in a third-party is quite risky.
So what is the better option?
For Android (2:15)
Simply copy the URL of the video and paste it in the Firefox browser. And turn on desktop mode and play the video. Now, even if you minimize the browser or turn OFF your screen, the audio will still play in the background.
For iOS (3:30)
Copy the URL of the video and paste it on Safari web browser. Now play the video and minimize the app. This will stop the audio. but don’t worry. Swipe up from the bottom of the screen, bring the control center and tap the play button. That’s it.