I don't know if this would be helpful in your situation, but you can also define configurations in your Build Properties and set conditional compilation symbols based on the specific runtime context.

So if you have dev, test and prod defined with different symbols...

You can leverage that to do something like this:
[TestClass]
public class SandboxManager
{
public static SemaphoreSlim UIClosedAwaiter = new SemaphoreSlim(1, 1);
public static SemaphoreSlim SS_Boot = new SemaphoreSlim(0, 1);
[AssemblyInitialize]
public static async Task BootUnitTest(TestContext context)
{
ResourceInfo.UTRoot = @"D:\Github\xamarin-21\sasquatch-net-standard-21\sasquatch-net-standard";
var dir = Path.Combine(ResourceInfo.UTRoot, "Test", "Logs", $"{DateTime.Now:yyyy-MM-dd}");
Directory.CreateDirectory(dir);
TestBase.LogFile = Path.Combine(dir, "log.txt");
if(File.Exists(TestBase.LogFile)) File.Delete(TestBase.LogFile);
#if SBX_SQFA
UIClosedAwaiter.Wait(0);
SQInstance.RunContext = RunContext.UnitTestFullUI;
MainActivitySandbox.Boot();
await SS_Boot.WaitAsync();
await onBootSQFA();
#elif SBX_UI_LITE
UIClosedAwaiter.Wait(0);
SQInstance.RunContext = RunContext.UnitTestLiteUI;
AppWOUISandbox.Boot();
UIControlSandbox.Boot();
await SS_Boot.WaitAsync();
#elif SBX_MOCK_AI
SQInstance.RunContext = RunContext.UnitTestLiteInstance;
AppWOUISandbox.Boot();
#else
SQInstance.RunContext = RunContext.UnitTestPrimitive;
#endif
SS_Boot.EnsureRelease();
await Task.Delay(100);
}