This issue can be reproduced even with Apple's sample project from https://developer.apple.com/documentation/storekit/in-app_purchase/implementing_a_store_in_your_app_using_the_storekit_api
Just buy 1 non-consumable IAP and spam re-run app (with 1-2 seconds breaks), 1 in 10 times you will have issue like yours, where it cannot even read Transaction.currentEntitlements.
I noticed that when this bug occurs, there is also bug with UIDevice.current.identifierForVendorand AppStore.deviceVerificationID, both have temporary changed values (only for this bugged run, they get back to old values when you re-run app and there is no bug).
Probably the source of the bug is underlying bug with identifiers that are used to verify transactions.