When Rotate screen, a scanning sheet does not respond to any touch interactions

I have implemented NFC card reading functionality using NFCTagReaderSession. After starting the NFC reader session in landscape mode at least once, if I switch back to portrait mode and attempt to start the NFC reader session again, the scanning sheet does not respond to any touch interactions.
Regardless of whether the screen is rotated, I expect the user to be able to close the reading screen, but it remains open.
Is there any workaround for this issue?

Code:

class ViewController: UIViewController, NFCTagReaderSessionDelegate {
    func tagReaderSessionDidBecomeActive(_ session: NFCTagReaderSession) {
    }   
    
    func tagReaderSession(_ session: NFCTagReaderSession, didInvalidateWithError error: any Error) {
    }
    
    func tagReaderSession(_ session: NFCTagReaderSession, didDetect tags: [NFCTag]) {
    }
    
    override func viewWillTransition(to size: CGSize, with coordinator: any UIViewControllerTransitionCoordinator) {
        super.viewWillTransition(to: size, with: coordinator)
        
        let session = NFCTagReaderSession(pollingOption: [.iso14443], delegate: self)
        session?.begin()
    }
}

PLATFORM AND VERSION
iOS
Device Information:

  • Xcode 15.3
  • iPhone Xs (iOS 17.4)
  • iPhone 8 (iOS 16.7.7)

STEPS TO REPRODUCE Procedure and Results:

1.Launch the app.
→The portrait mode is displayed.
2.Rotate from portrait to landscape.
→The landscape screen shows the NFC reading interface.
3.Tap the cancel button on the NFC reading screen.
→The landscape NFC reading screen closes.
4.Rotate back from landscape to portrait.
→The portrait screen displays the NFC reading interface.
5.Tap the cancel button (cross icon) on the NFC reading screen.
→The portrait NFC reading screen does not close.

When Rotate screen, a scanning sheet does not respond to any touch interactions
 
 
Q