Vinegar extension still works on iOS. It restores the native HTML5 <video> element to websites like YouTube that go out of their way to circumvent it or add listeners to pause it when focus leaves the page. Since it’s the native video element, it works with the native iOS picture-in-picture.
It should frankly be illegal for Google to interfere with this like they try to do, but luckily this extension solves the problem.
This does work with the screen on. But at least for me Vinegar background audio while locked hasn’t worked for the past several weeks. Once you lock it no longer recognizes there’s any media to play.