Hi Karthik,
Do you have MFA enabled on the environment and to understand the issue a complete log will be required and also the setup of the environment, meanwhile please go through this detailed workflow and config of how PRT token works in the background.
Hope this helps.
---
Please "Accept the answer" if the information helped you. This will help us and others in the community as well.