Minimize App with back button Ionic V5

Hello, I’m trying to minimize my app with the example of Cordova App minimize and it works, the problem is when I open the app again, it gets me back to the previous window. I don’t wanna it, I wanna when the app open again it gets me to the window it minimize. Thanks