My app has 2 activities. The root activity of the app is the MainActivity. If credentials are missing or invalid the user will be redirected to the LoginActivity while finishing
allowTaskReparenting = true
https://developer.android.com/guide/topics/manifest/activity-element#reparent
May have solved your issue (with this set, when you return to the forwarding app, you will be returning to the activity natural for that app and not the activity that it launched in the target app) Not too sure why true isn't the default for this...