iOS/iPadOS 16 was released in September 2022 and has proven to be one of the buggiest releases do date.
Among the on-going issues is an inability to properly detect the output resolution of an external screen - most commonly placing "bars" at the top and/or bottom of your secondary screen.
This issue appears to affect primarily Face ID devices, and may or may not be related to the new "Stage Manager" feature introduced in iOS/iPadOS 16.
Unfortunately, until Apple patches this bug, your options are fairly limited:
1. Try using a non-FaceID device.
2. Downgrade your device to an older OS such as iOS/iPadOS 15.5.
I am eager for a patch as I'm sure you are! If you have found any workarounds or fixes please let me know: me@josiaho.com