IIRC the Americans were fully aware of the derisive nature of the song but as they started winning the battles and eventually the war they reclaimed it in a middle finger, “guess what, we won anyway” fashion.
Yeah, that's the part that always gets left off when this comes up. People say it like Americans were too dumb to realize they were getting mocked, but the reality is more like "Let's go Brandon" becoming "Dark Brandon."