Claudia Sheinbaum’s nationalist predecessor, Andrés Manuel López Obrador, implemented changes that risk blowing up longstanding ties with the U.S.