Additional chat-related features and issues within Microsoft Teams for business
I was having the same issue but was able to resolve it pretty easily! Close out of Teams > Navigate to Settings > Apps > Installed Apps > Locate Microsoft Teams > Advanced Options under the 3-dots > scroll down to Reset and select it. Easier and quicker than doing an uninstall/reinstall.
Thank you this fixed the non-collapsing left sidebar.
And yes, the chats remained there with pinned people and so on. Only thing that was reset was my Teams settings and most noticeably the teams color theme and notification settings. And my second organization account was removed from the list but you could easily add it back. Small price to pay for peace of mind and stopping the hindrance to your workflow.