Not able to inspect element for appium 1.22.0 using inspector and appium 1.20 with inbuilt insplector

ioS Version - 15.6
Xcode version - 13.4
Appium 1.22.0

Webdriver location: /Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-webdriveragent

When we are trying to inspect element we can not cast screen and not able to capture screen shot
and get id

Getting the sever hang up error and Getting the xcode build fail error although while building through command line webdriver agent build successfully.

Error: Get Response with status 500: {“value”:“error”:“unknown error”, “message”:"-[XCUIsScreen screenshotDataForQuality:rect:error:]"} unrecognized selector

Please help…

Thanks in advance…