In sway/workspaces, just like disable-scroll turns on/off the ability to change workspaces by scrolling the mouse add disable-click that turns on/off the ability to change workspaces by clicking.