What is the recommended way to make an IOS build that does local (in app) receipt validation for TestFlight AND production

In trying to deploy an app to IOS, I am struggling to understand how to configure local on device IAP receipt validation to work both in testflight, and then in production. Is it usual for people to validate against the Apple Store CA certificate, and if that fails to test against the Sandbox certificate? This seems to be what is suggested in internet answers when searching for this problem. None of the unity example apps include a workflow that has two CrossPlatformValidator instances and falls back to the test certificate if the production one fails.

Some people seem to suggest using separate builds - which seems to go against years of devops best practice. Surely I want to test the actual production build?

Perhaps I am confusing StoreKit with Sandbox? So a simpler question then…

To use local validation within TestFlight do I use AppleTangle or AppleStoreKitTestTangle during validation?