The U.S. issue is SPARE lithium batteries, not those installed in devices. See the FAA and TSA regulations, for example https://www.faa.gov/about/initiatives/hazmat_safety/more_info/?hazmat=7. The spare lithiums must be in carry-on.
However, flying out of Mexico is different; NO SPARES can be in carry-on....including spare alkalines, not just lithium.
People will tell you they've had no problem, but that is an anecdote, not the rule. People will also tell you they've driven after drinking and had no problem. Does that make it a good idea?
So if you are flying out of Mexico through a U.S. connecting airport, your best strategy is to put ALL your spares in checked luggage to leave Mexico, then move your spare lithiums to carry-on before you recheck your bags in the U.S.