StaleElement Error [Unable to perform work on main run loop, process main thread busy for 30.0s] when iOS DOM size is very large

[WD Proxy] Got response with status 404: {“value”:{“error”:“stale element reference”,“message”:“The previously found element “Application ‘com.wrnty.peppery’” is not present in the current view anymore. Make sure the application UI has the expected state. Original error: XCTPerformOnMainRunLoop work timed out after 60.0s”,“traceback”:"(\n\t0 CoreFoundation 0x00007fff20422fba __exceptionPreprocess + 242\n\t1 libobjc.A.dylib 0x00007fff20193ff5 objc_exception_throw + 48\n\t2 WebDriverAgentLib 0x000000010a369e35 -[XCUIElement(FBUtilities) fb_takeSnapshot] + 1077\n\t3 WebDriverAgentLib 0x000000010a36a0eb -[XCUIElement(FBUtilities) fb_snapshotWithAttributes:maxDepth:] + 187\n\t4 WebDriverAgentLib 0x000000010a307699 +[FBXPath writeXmlWithRootElement:indexPath:elementStore:includedAttributes:writer:] + 937\n\t5 WebDriverAgentLib 0x000000010a3069c9 +[FBXPath xmlRepresentationWithRootElement:writer:elementStore:query:excludingAttri…
[W3C] Matched W3C error code ‘stale element reference’ to StaleElementReferenceError
[BaseDriver] Waited for 275425 ms so far
[WD Proxy] Matched ‘/element’ to command name ‘findElement’
[WD Proxy] Proxying [POST /element] to [POST http://127.0.0.1:8100/session/26899BD2-5F42-4D10-8C3D-DC4D7074E09C/element] with body: {“using”:“xpath”,“value”:"//XCUIElementTypeImage/following-sibling::XCUIElementTypeStaticText[@name=‘Sales Order’]"}
[WD Proxy] Got response with status 404: {“value”:{“error”:“stale element reference”,“message”:“The previously found element “Application ‘com.wrnty.peppery’” is not present in the current view anymore. Make sure the application UI has the expected state. Original error: Unable to perform work on main run loop, process main thread busy for 30.0s”,“traceback”:"(\n\t0 CoreFoundation 0x00007fff20422fba __exceptionPreprocess + 242\n\t1 libobjc.A.dylib 0x00007fff20193ff5 objc_exception_throw + 48\n\t2 WebDriverAgentLib 0x000000010a369e35 -[XCUIElement(FBUtilities) fb_takeSnapshot] + 1077\n\t3 WebDriverAgentLib 0x000000010a36a0eb -[XCUIElement(FBUtilities) fb_snapshotWithAttributes:maxDepth:] + 187\n\t4 WebDriverAgentLib 0x000000010a307699 +[FBXPath writeXmlWithRootElement:indexPath:elementStore:includedAttributes:writer:] + 937\n\t5 WebDriverAgentLib 0x000000010a3069c9 +[FBXPath xmlRepresentationWithRootElement:writer:elementS…
[W3C] Matched W3C error code ‘stale element reference’ to StaleElementReferenceError
[W3C (7ed2b58d)] Encountered internal error running command: NoSuchElementError: An element could not be located on the page using the given search parameters.
[W3C (7ed2b58d)] at XCUITestDriver.doNativeFind (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/lib/commands/find.js:130:11)
[W3C (7ed2b58d)] at processTicksAndRejections

This is a known XCTest limitation. https://github.com/appium/appium/issues/15366 could be similar