Why UIAlertController force to move portrait on iPadOS16 beta4

Just create simple project. And we have a ViewController like

class ViewController: UIViewController {
    override func viewDidLoad() {

        super.viewDidLoad()

        // Do any additional setup after loading the view.

    }

    @IBAction func onAlertButton(_ sender: Any) {
        let ac = UIAlertController(title: "title", message: "msg", preferredStyle: .alert)
        let action = UIAlertAction(title: "OK", style: .default, handler: { _ in
            ac.dismiss(animated: true)
        })
        ac.addAction(action)
        present(ac, animated: true)
    }

    override var supportedInterfaceOrientations: UIInterfaceOrientationMask {
        return .allButUpsideDown
    }

    override var shouldAutorotate: Bool {
        return true
    }
}

When run this app on iPadOS16 b4, then move to app landscape mode, and present UIAlert, the app goes to portrait. Also during alert is presenting, back to landscape, then dismiss alert, it goes to portrait too.

Under iPadOS15, app keep landscape, so my question is that this is intended behavior?

Same here with the UIAlert generated by iOS / iPadOS asking for permission to use the microphone. Hope you can fix this.

Still not fix on Xcode14 b6 simulator (20A5339d). Also it's same on iPadOS16.1b1 (20B5027f) real device. So it seems Apple think apps should display vertically before and after UIAlertController. It's weird.

Did anyone find a solution or workaround for this!? This is still happening for me on iPadOS 16.6.

Why UIAlertController force to move portrait on iPadOS16 beta4
 
 
Q