In Settings, find the app and turn on background restriction. This will restrict the app from continuouosly using the battery while it's running in the background.
Note: When background restriction is enabled, the app may not work as usual and notifications may be delayed.
Go to Settings, and then tap
Recently opened apps, tap an app you want to configure.
If you don't see the desired app, tap
See all ___ apps, then tap the app that you want.
App info screen, tap
Manage battery usage, tap