A lot of the issues related to multitask actually comes from OEM customizations. Many Android OEMs, especially Samsung, would make killing background apps more aggressive.
Take a look at https://dontkillmyapp.com/
Take a look at https://dontkillmyapp.com/
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.