Just a comment, but this information about Prod returning 401 should be documented and made much more prevalent in the Apple API documentation.
https://developer.apple.com/documentation/AppStoreServerAPI
Topic:
App Store Distribution & Marketing
SubTopic:
General
Tags: