Banning striking need not involve forced labor. See the US government's response to federal employees striking: https://en.m.wikipedia.org/wiki/Professional_Air_Traffic_Con...
If you're responding to my statement of "can't legislate it away", then I suppose yes you're right that is an example of being able to do that and I should have worded that differently, but the key there is that it only works if your threat convinces the workers to return. Which, according to that Wikipedia article, it didn't entirely and their staffing levels didn't fully recover for a decade.