No, this isn't an ad for Zenni but since discovering that I could order glasses on line for a fraction of what I've been paying in New Zealand, I've been on a bit of a spending spree. Oh, and you might need headphones for this one :)
To listen while using other apps, switch the player to Picture-in-Picture (PiP) during playback — it keeps playing in a small floating window (the screen stays on).
To listen with the screen fully off, in-browser playback stops by YouTube's design. Open the video in the YouTube app to keep listening where background playback is supported (e.g. with YouTube Premium).
Open in YouTube app