To make sure that battery restrictions don't cause issues, follow these steps:
- Navigate to Settings -> Apps & notifications -> Advanced
- Tap Special app access.
- Tap Battery optimization.
- Tap the drop-down menu and select 'All apps'.
- Find and tap Detecht.
- Set the setting to 'Don't optimize'.
- Tap Done.