I am coding in VS Code, ad I was wondering if there exists a way to collapse the second sidebar's icons like the primary one (with the activity bar) and keep them always visible. Is there a way to achieve this, maybe with an extension?
VS Code doesn't offer anything like a "Secondary activity bar" afaik, so I tried looking for an extension or UI customizer, but nothing would achieve what I was looking for.
You're not going to find anything with VS Code vanilla. It was raised in a feature request, which was declined as out of scope: Add Activity Bar Support for Secondary Sidebar #195561. See this comment:
I can't say it's not possible for a UI customization to achieve this, but I think it would be a pretty difficult feat- especially if you wanted feature and behaviour parity.