It’s not fair to call that a war of aggression on our part. Mexico claiming to own vast swaths of land including California and Texas in the 1840s was about as legitimate as Spain’s prior claim over the same “New Spain” which Mexico merely inherited… again by violence.
It’d be as if the US claimed to own Antartica, the moon, or mars. Perhaps there may have been a few people there, but it was never a serious enough population that anyone could think their claim of ownership was competitive. I mean, they had a stronger claim than Spain, but that’s not saying much.