The teams search will find old UPNs which cannot be clicked on after domain change
Microsoft Teams displays multiple users in chat history search when UPN is changed. Often the old UPN will result in a 404 and is not clickable.
As a workaround to initiate new chat sessions, using the "new chat" icon works and to search for old chat history we have to the use the display name and filter all results by date. the old UPN shows a the 404 error when reproducing the issue through the teams (web).
Jordan Sirota commented
The 404 error occurs when reproducing error on web client.