
When doing the same action with the same user using a local Tableau session it works fine.
I followed the network calls doing the described steps, and the failed case stops at a call to getFieldValues going directly to the Tableau server. All the authentication headers are correctly attached as expected, but it returns 401 and clears the session cookie for no reason that I can discern. The implementation of this on the Tableau server is not available, and I can’t find any documentation about this exact case in the Tableau documentation or the community.
Here, is the error message:
Error: Your session timed out. Reopen the dialog to connect.
Has anyone here faced similar issue with the tableau implementation? Is there any reason this is occurring other than a bug in the tableau? Please let me know. If you have faced similar issue or have links to documentation I can follow. Thank you.

The proxy configuration was my best guess based on the information.
You'll probably need to see if Support can help. Unfortunately, they can't/won't help with your code. They can review logs and see if they notice any problems there.