There was the Mexican-American war, and then the incursion of Pancho Villa which Pershing repelled and prosecuted...
But I still get your point; the vanquished can’t fly their flag in the US.
PV's attack was a raid, not an invasion. And it was not a success. He achieved complete surprise but nevertheless lost 5x the men the Americans did, despite outnumbering them 2:1. He retreated right back across the border.
Pershing didn't know about it until well after the fact. He did not "repel" the attack. That was done by the men, black cavalrymen, and junior officers on the spot.
The American incursion into Mexico was not a success by any reasonable measure, militarily or otherwise, and came pretty close to turning into a disaster.
That does explain why those high school boys in California weren't allowed to wear the American flag.