How to prevent an iPhone-only app to run on iPad at Landscape mode?

Hello, I'm wondering if I can lock my app to work only on Portrait mode, the boxes of "Landscape right" and "Landscape left" are already unchecked.
My app glitches when turning an iPad into landscape mode.
I can't get through the app submission process to App Store without solving this issue.

Currently using Xcode 12.4 and SwiftUI 5.

In Xcode, where you select Portrait only, you need an extra step.
  • Select iPad only (deselect iPhone)

  • You will see 4 directions authorized

  • keep only Portrait

  • Then select iPhone and iPad again.

I tested in Simulator it makes it work (and did not work before).

Found more details here:
https://stackoverflow.com/questions/30429276/locking-orientation-does-not-work-on-ipad-ios-8-swift-xcode-6-2

That would be worth a bug report.
Don't forget to close the thread if that works.
It unfortunately didn't work, I tried that, tried reinstalling xcode, tried changing plist file, but nothing seems to work, I don't know what to do.
How to prevent an iPhone-only app to run on iPad at Landscape mode?
 
 
Q