The following worked for me:

Setup/Apps/Foobar/Battery/Optimise Battery Usage - then make sure Foobar is NOT optimised.