We have started getting the same error when validating one of our apps but distribution works fine.
It hit our CI/CD pipeline which gives another error alongside the one presented when you do it through Xcode (which we also tried, on two machines, to no avail):
2021-07-28 17:49:15.148 altool[70016:1000722] -[NSTaggedPointerString objectForKeyedSubscript:]: unrecognized selector sent to instance 0x6148155f75af93ed
2021-07-28 17:49:22.706 altool[70016:1000710] *** Error: Unable to validate archive 'xyz.ipa'.
2021-07-28 17:49:22.706 altool[70016:1000710] *** Error: code 1095 (App Store operation failed. Unable to process app at this time due to a general error)