The company that paid the tax gets their money back. Whether they decide to make any refunds to their customers is up to them. A few companies have said they would.
This is no different from any other cost. Their cost of goods is lower in retrospect than they thought it was, so it will show up as a gain on their income statement.
What's the economic effect, though? One way to model a tariff that's later refunded is that it's sort of like if a cartel colluded to temporarily keep prices higher. Competition between firms often keeps prices close to costs, but this wouldn't be true for a monopoly or a cartel.