On your Xiaomi first time you launched app, you can determine wether you always allow or allow on prompt (but you should still be able to manage that setting afterwards). You also need to disable battery optimization for that app and set app to be able to auto launch in background. This is at least what I do with my home assistant app to determine GPS location in background (app record every 15mn) and no issues with battery draining.
Haven’t read so can’t tell you but you will find info at https://leminal.space/post/11699480