Samsung's Device Care suite for Galaxy devices lets you monitor and optimize the battery, storage, and memory in just a few taps. It also allows you to manually free up your phone's RAM by stopping background apps in one go.
As you may know, you can do this by opening the Settings app, accessing “Device Care,” tapping “Memory,” and pressing the “Clean now” button. However, this option will remove any and every background app from memory
But there is a way to add apps to an exclusion list, so they'll never be removed from memory when you perform these maintenance tasks via Device Care.
Prevent apps from being cleaned from memory
To add apps to this exclusion list, go to “Device Care” and access “Memory.” Then, simply tap the “Excluded apps” option, tap the “+” button in the upper-right corner, select the app you want to exclude, and tap “Add.”
The selected app will now remain in memory even if you perform memory cleaning tasks like “Clean now.” And if you ever want to remove an excluded app from the exclusion list, tap and hold it, then tap “Remove.”