Lock your apps on the screen and put your phone back in your pocket.
Lock your apps on the screen: in this way, you can put your phone back in your pocket without the fear of undesired taps.
Open Lock App Screen, now open YouTube, play your video, tap the notification of Lock App Screen and you are free to leave your phone running without fear, while listening your music.
If you don't want anymore the notification, just swipe it out.
You can find the App on the Play Store: https://play.google.com/store/apps/details?id=me.danilopolani.lockappscreen