Same issue: Mac M1 - Microsoft Teams version 24215.1002.3039.5089.
MS should stop making changes to its UI control that users still want.
If you want to fix it for other users who want to keep their panel open, be more mindful of the other side of the users who don't want the change and at least provide the option to manually open/close the sidebar. I'm a software developer and this is such a basic thinking process when you make changes to your products considering what issues the changes may cause to the users.
MS is such a huge company and I don't understand why you guys make this kind of issue all the time when applying changes to apps no matter if it is Teams or any other of your products, especially Teams and Outlook when both apps are daily used for numerous universities and organisations for work and education. Be ashamed of your reputation and the size of the organisation.
When there is any alternative out, I will definitely move to the product. I'm so sick of MS making this kind of beginner issue all the time.