How to limit Android app to only work when in foreground?

Hi All,

I updated the Android app to the latest version after a year. On updating I noticed that the option to only run Syncthing when it was in the foreground was gone. No such option exists now under Run Conditions. How can I make Syncthing only work when app is in foreground?