Mac OS version of TeamViewer 15 displays the following message in Computers & Contacts tab:
You are currently offline
Please check your internet connection.
The application is trying to reconnect
The computer is actually online and TeamViewer can connect to clients by manually entering ID and Password. It's just Computers & Contacts section that doesn't work.
To resolve the issue I had to perform full TeamViewer uninstall / reinstall cycle. However, the uninstall has to be done from the TeamViewer preferences, not just by removing it from the macOS Apps folder.
Open TeamViewer, go to Preferences > Advanced and scroll down to the very bottom. In the Uninstall section, select "Also delete configuration files" and click Uninstall.
After uninstall is completed, download the latest version from teamviewer.com and reinstall it.
macOS 10.15.4 (Catalina)