Another update. I've been able to reproduce the problem on all of these devices so far, if following a certain procedure.
iPhone 13 Pro max, iOS 16.1.1
iPhone Xs, iOS 16.1.1
iPhone 13, iOS 16.1.1
Open Youtube app.
Play a video in landscape on the iPhone.
While still in landscape, click on the cast button, select Airplay, connect some external device (screen or speaker, does probably not matter)
Disconnect Airplay / play the video on the iPhone again.
Switch to portrait mode.
While in portrait and video is playing, open the Airplay popup again.
Try to tap on an external speaker/screen, but you'll notice the popup is not responsive so you probably cannot choose any device. <<< this is the problem