President reaches deal with Claudia Sheinbaum to temporarily avert costly trade war