LWA fails to redirect to the app to continue the login process

When I’m using Login with Amazon (LWA), after successfully logging in on the webpage, it prompts me whether to open the app. However, at this point, it fails to redirect to the app to continue the login process. Manually switching to the app allows me to proceed with the remaining steps.