I haven’t found a way to do this yet, but please let me know if it’s already possible.
The official YouTube app on both tvOS and iOS only plays up to 1080p, because Apple hasn’t implemented any VP9 hardware decoding on their platforms.
I see that Infuse supports both VP9 and the experimental AV1 codec that YouTube uses for >1080p content (4K, 8K, etc).
Being able to stream a YouTube video in 4K (VP9) directly through Infuse would be a tremendous feature.
I’d finally be able to stop using my TV’s built-in YouTube app for 4K videos. It would also be yet another advantage over the other video apps on the market.