I run AOSP and can confirm the claims of the parent comment. It's not just OEM customizations, Android itself got way more memory hungry in the past years.
Regularly I can't even have two apps running at once without one of them being force unloaded and that's with all the "battery optimizations" disabled, because without it's even worse.