"invalid element state" after upgrading Appium 1.21

I am using Appium 1.21 , IOS real device.
Below are the steps I do in my test script
launch app close it
copy QR code file in FilesApp using driver.pushfile(com.apple.DocumentsApp)
let iOS driver open the QR code from files app open with app
Am able to open with app but when am trying to verify any element it says

Note: After upgrading Appium server to 1.21 from 1.20 am seeing such issues. I tried downgrading but yet the same now :frowning_face:

matched W3C error code ‘invalid element state’ to InvalidElementStateError
[debug] [BaseDriver] Waited for 1630 ms so far
[debug] [WD Proxy] Matched ‘/elements’ to command name ‘findElements’
[debug] [WD Proxy] Proxying [POST /elements] to [POST] with body: {“using”:“xpath”,“value”:"//*[@label=‘Key Details’]"}
[WD Proxy] Got response with status 400: {“value”:{“error”:“invalid element state”,“message”:“The application under test with bundle id ‘com.apple.DocumentsApp’ is not running, possibly crashed”,“traceback”:"(\n\t0 CoreFoundation 0x000000019aafe768 4FBDF167-161A-324C-A233-D516922C67E5 + 1218408\n\t1 libobjc.A.dylib 0x00000001af5c57a8 objc_exception_throw + 60\n\t2 CoreFoundation 0x000000019aa02874 4FBDF167-161A-324C-A233-D516922C67E5 + 186484\n\t3 WebDriverAgentLib 0x0000000102960450 -[FBSession activeApplication] + 604\n\t4 WebDriverAgentLib 0x0000000102963a38 +[FBFindElementCommands handleFindElements:] + 260\n\t5 WebDriverAgentLib 0x0000000102928a80 -[FBRoute_TargetAction mountRequest:intoResponse:] + 196\n\t6 WebDriverAgentLib 0x0000000102908cc0 __37-[FBWebServer registerRouteHandlers:]_block_invoke + 448\n\t7 WebDriverAgentLib 0x0000000102949d2c -[RoutingHTTPServer handleRoute…
[debug] [W3C] Matched W3C error code ‘invalid element state’ to InvalidElementStateError

driver.terminateApp(Files app bundle ID). will close the files app and allow driver read app elements