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/

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…