After app activity resumed the app is going back to screen1 automatically

Sorry to say but the solution you have presented is not a proper fix(maybe there is no fix) of the issue. It’s just a process of automatic redirection of the app from screen1 to screen2 after resuming the app.

**** In this situation, the stuff on screen1 will reload and data on screen2 will also reload.

******* Maybe @Kodular should look into this matter.