software solutions might be tough to come by for this. if the app is determined enough it's going to be detectable (if the app isn't that sophisticated or the stakes aren't high that helps lol). Is rooting feasible?
if you spoofed gps and set up a pi or some other device to broadcast fake wifi networks that match the names and mac addresses of the location you're supposed to be at maybe you could fool location services.
or spoof gps and find some way to block/disable wifi detection besides the toggle so it falls back to the spoofed gps. maybe a little faraday bag, jammer, or some software fuckery that breaks wifi without toggling the specific setting they're checking for
ultimately its a losing battle because your phone is designed to be a highly resistant/flexible tracking device. Which makes it a useful tool, but the software is locked down so its not really under your control, and even if it was making changes is a lot of work