I seem to remember that Youtube also has "keep playing audio when you turn the screen off" as a premium feature for their subscription?
For anyone interested, NewPipe and Youtube Vanced are solid alternatives that allow you turn the screen off during playback without a monthly charge.
Now I’m reluctantly paying Google for Pro. It’s worth it to avoid the ads on my Roku etc, but I just hate giving them money :(