My understanding over the US/MX cartel relations is performing an invasion and “act of war” would solidify asylum status claims by Mexican residents and throw a wrench into the whole immigration scheme every administration plays.
But then again this time seems different, laws aren’t followed or upheld. Human rights are a fleeting staple.
Starting a war with Mexico would be a pretext for interning everyone of "Mexican" ethnicity, citizen or otherwise, as was done to Japanese nationals.
Its mincing words a bit, but an attack targeting drug cartel assets wouldn't necessarily be viewed as a war with Mexico. It could lead to that for sure, and the Mexican government could declare it an act of war, but we did just see the US literally invade a foreign country and arrest their sitting leader without war being declared on either side.
Yet. It has certainly ratcheted up worldwide tensions, to put it mildly.
The US hasn't declared war since World War II.
I suspect Mexicans would view it as another Pancho Villa Expedition, which was also event where neither side declared war.