Like in the thread
@svtride linked to above, there are several ways you can do it. In my opinion, turning off the "display over all apps", in the Stark app, is the best. I use onX every trail ride (I have Varg MX) and it is so nice to have the map up the entire ride. True you can't see battery level, which of your 5 ride settings you are in, nor get warnings (overheating, etc.) but that is the same as if you choose to ride with the Varg phone dismounted and in your pocket. And you can stop and flip to any other open app, like the Stark app, quickly. So you can stop and check battery level or for warnings anytime. I mainly use ride settings 2 or 3 and I can tell by feel which I'm in, so don't really need the Stark app displayed. When in doubt, I can thumb down to what I know is setting 1 and then go up to 2 or 3 as needed. I don't miss having the app displayed as battery level is the only reading I need to keep an eye on and I don't need that constantly; only now and then.
Example: I just did a typical single track and 50" ride in the mountains. Started at 99% battery, rode 41.3 miles for 3h25m with 5,989feet of elevation change and got back to the trailer with 31% battery State of Charge (SOC). I mostly checked battery level mid ride so I knew when to turn around and head back, which I did at 64% SOC (after ~20 miles). I decide when to turn around based on the terrain and elevation on return trip. If it's all down the mountain on return trip, I turn around with 50 - 55% battery remaining. In this case, I had to climb back up elevation from my turn around point, so turned around at 64%, was down to just over 50% when I got back to high point after less than 5 miles, then road the remaining 15+ miles out and was down to 31% SOC at the trailer.
Around the midpoint, I flipped the Stark app to the front to keep an eye on battery level. After I turned around, flipped onX map back to front. Checked battery level once when I got back to high point and then not again until I got back to the trailer. Changing the Stark App to turn off "display over all apps" works great. So in a 41 mile, 3h25min ride, I probably had the Stark app up 5 or 6 times to check battery level; one of those being for about 10 minutes straight in the middle of the ride. The rest of the 3.5 hours, onX map app was up.
