Hey guys i found a solution to this issue! Just go to power, click on battery optimisation, select all apps, select the app that's being an issue (gmail/play store for example), and choose don't optimise.
Do that for every app that's being an issue.
Cheers!
Let me know if this helped