That’s how it’s done. you don’t MAKE a law that limits free speech. You just make practicing it illegal.
This reminds me of a 1970s movie called “Spririt of 76.” I think it starred David Cassidy. In a futuristic world everyone is stuck wearing drab grey clothes and the national anthem is nothing more than a single tone blared out over loud speakers.
It’s probably in the harridan’s video collection.