Are you sure of that? A great deal of this kind of crap occurred during WWI, but a lot less in WWII. Or at least that's my understanding.
I suspect the reason may be that we were fighting "the Germans" in WWI, while in WWII we were fighting "the Nazis."
Well, I just heard that on a PBS program called “The Making of Milwaukee”. I didn’t live here than, so it surprised me. I know that they taught school a half day in German in my town (a suburb of Milwaukee) until the beginning of WWII and they had militaristic youth clubs of a German flavor in Grafton (another Milwaukee suburb).
I didn’t know that there had been a problem with the German composers, but in Boston, both “The Mikado” and “Madame Butterfly” were banned. The Mikado was actually making fun of the British, albeit in Japanese Garb, but “Madame Butterfly”: made Americans look like real skunks!