Youtube’s website now supports iOS 14’s picture-in-picture mode. It can be enabled in both Safari and third-party browsers like Chrome or Firefox. You can also slide the PIP window to the side if you just want to hear music.
Os-Level picture-in-picture support was added as a new feature in iOS 14. Shortly afterwards stopped working on YouTube’s website for iPhone users. It continued to work for users who subscribe to YouTube premium.