Deep links are not directing users to the intended apps, instead, they are redirecting to the respective apps on app store

Problem : Deep links are not directing users to the intended apps, instead, they are redirecting to the respective apps on app store.

When clicking on a deep link in private mode, it consistently displays a prompt to open the application or cancel.

If the "Cancel" button is selected on the prompt, it redirects to the app store via a deep link to open the specific application, on next time onwards we are not receiving the prompt to open application, every time it get redirects to the appstore via merchant link automatically.

In other case if we click open button on the prompt , it redirects to the application, Subsequently, each time we click the deep link, it repeatedly prompts us to open the app.

Why do the "Open" and "Cancel" buttons lead to different outcomes in these scenarios?

How can we ensure that the application always opens when clicking on the deep link, if it is in private mode as well?