The Withdrawal Agreement Backstop is a UK-wide Customs Union with the EU.
In this event, who gets the tariffs?
While this doesn't appear to be explicitly listed in the draft withdrawal agreement, at the moment the majority of the tariffs collected at the point of entry to the customs union go to the central EU budget, after deductions to pay for the costs of collection. Under that system, this would count as part of the payments the UK have to make to the EU following their withdrawal and be deducted from the payment plan for that. Presumably, long term it would be offset against any fees the UK was charged for later access to EU services.