The problem is caused by badly written apps. iOS (and iPadOS) has a very different memory management than Windows or macOS. There is no memory swapping to the “hard disk” and therefore if an app in the foreground needs memory every app in the background could be ended by the system at any time. That’s why app developers should always implement saving everything automatically while the app is in the foreground or at least when it goes to the background. Switching to an automatically closed background app means reloading the saved state. This should be exactly the same state as the app was when it went to the background.
There are obviously bad apps that do not follow this requirement. These apps are your problem.
I think a better selection of choices would have been: