If you’re running iPadOS 16.2 Beta, don’t upgrade to version 4 as it breaks AirPlay to devices when you’re connected to an external display. Once you’ve updated to Beta 4 and try to AirPlay to external speakers iPadOS tells you that you can’t use AirPlay while connected to an external display.

If this persists it makes external monitor support fairly bad as many monitors will not have speakers, and even ones that have decent speakers can’t compare to a set of Sonos speakers or a pair of HomePod Mini’s on your desk.

I’ve filed a feedback for this: FB11852693 (AirPlay stopped working when I’m connected to a monitor)