For any developer still struggling with IAP sandbox issues and NSLocalizedDescription=Unhandled exception or UserInfo={NSLocalizedFailureReason=Payment Sheet Failed, resulting in Sign-in occurring twice or the Apple purchase modal prompt appearing twice; the Solution might be found in completing all steps in this article which, in my case, has made it possible to test reliably using App Store sandbox and StoreKit. Hope this helps someone.
Setting Up StoreKit Testing in Xcode
https://developer.apple.com/documentation/xcode/setting_up_storekit_testing_in_xcode#3625700
Topic:
App & System Services
SubTopic:
StoreKit
Tags: