The Trump administration and companies such as Amazon had argued that letting the suit go forward would expose logistics companies to liability under a “patchwork” of state laws.