I'm facing exact same problem. When making purchases on the TestFlight environment, it always makes purchases against my real Apple ID.
But the doc says we can test on TestFlight using Sandbox.
https://developer.apple.com/documentation/storekit/in-app_purchase/testing_at_all_stages_of_development_with_xcode_and_sandbox
Topic:
App & System Services
SubTopic:
StoreKit
Tags: