I had a similar problem. Wanted to change the welcome screen so all buttons behave like "Terms of Use accepted", otherwise in my case about 66% of the tests end in closing the app. Found nothing in environment which identifies pre-launch report.
The only possible way I found is to determine the time frame when the tests will run. Of course, this is not reliable, but the last submits to Google Play always took at least 25 minutes until update was live.
Pre-Launch tests typically start soon after submitting the new version. So when you are able and willing to schedule the time of submitting the new version, you can use current time to detect whether app is tested or used in production. After Submit-Time + 20 minutes, enable production mode.
Hopefully Google provides us a reliable way to detect this environment. The service is great. Unfortunately I cannot see any screenshots due to permission issues, but the service is still in BETA, so it will be fixed.