The monthly trade deficit continued to shrink after President Trump imposed sweeping tariffs on foreign imports.