I managed to know if the app is in the editor by running the following code in the "OnVisible" property of the first screen:
If(
IsBlank(Host.Version) || IsBlank(Find("PowerApps-Studio", Host.Version)),
Set(inProduction,true),
Set(inProduction,false)
);
I notice during production if the app is running inside MS-teams "Host.Version" can return blank if the app hasn't fully loaded.
Later I just need to ask
If(inProduction, "Code I want to omit in the editor")
Host.Version can also be used to determine the OS the app is running, I had a small issue with iOS, so I custom code a way around for them using this idea.