For my Gravity screen works:
settings>battery & performance>something like application battery management>select application (idk is it right translation)
select there your app for proximity (Gravity screen in my case) to exclude from disabling/removing from memory.