(1) Battery Saver Settings:
- Go to Phone Settings -> Battery (or on some devices Battery & Performance)
- Make sure the “Battery saver” mode (also Ultra battery saver on some models) is turned off.
- Then select the Battery heading in the top bar.
- Select “App battery saver”.
- In the list, select the Activy application and in the expanded menu select "Save energy"
- Then click on the "Unlimited" option
(2) Additionally for MIUI 12.5
- Go to Phone Settings -> Battery
- On the bar below the battery image, select Performance mode, then confirm your choice.
(3) Additional Settings
- Go to Phone Settings -> Battery & Performance
- Then click on the "gear" in the upper right corner of the screen.
- Make sure that “Turn off mobile data when device is locked” and “Clear cache files when device is locked” are set to “Never”.