Hey, thanks for the report. This is a known regression in the 2.4 series. In the horizontal layout, the sidebar shouldn’t collapse like that. Everything worked correctly in 2.3.
The same issue is described here: Left sidebar collapses when clicking an already open tab icon (horizontal icon layout)
A temporary workaround is to switch the Activity Bar to the vertical layout:
"workbench.activityBar.orientation": "vertical"
This brings back the expected toggle behavior.