How to prevent apps from automatically closing on Redmi Note 5 Pro MIUI 10

Open Recents by clicking the button in the nav bar.
Swipe the open app downwards and you will see a lock icon on right top side of the app. This is now locked and it will not be removed when the list of recent apps is cleared.

Helped to keep iBlue Blue Light Filter app open.

Note that after 3 days, the app remains open, but it no more appears in the Recents list.