I’ve literally tried every single fix like toggling settings, installing and playing around with custom kernels or trying out root apps, and I’ve never been able to reduce the aggressiveness of MIUI’s RAM management.
That issue persisted even on my flagship-equivalent end MIUI devices. It only seems to disappear after installing AOSP-based custom ROMs.