Let’s check if your ID is not switching when you’re changing the password.
When you do the passwd command it should stay with no problem.
please run the following commands
teamviewer info
sudo teamviewer passwd [password]
teamviewer info
Please verify that TeamViewer info always show the same ID
Let’s us know the result so we can determine a solution for you.