Section 54(10)- Where any refund is due under sub-section (3) to a registered person who has defaulted in furnishing any return or who is required to pay any tax, interest or penalty, which has not been stayed by any court, Tribunal or Appellate Authority by the specified date, the proper officer may—
(a) withhold payment of refund due until the said person has furnished the return or paid the tax, interest or penalty, as the case may be;
(b) deduct from the refund due, any tax, interest, penalty, fee or any other amount which the taxable person is liable to pay but which remains unpaid under this Act or under the existing law.
Definition of existing law as per CSGT Act--
Section 2(48)- “existing law” means any law, notification, order, rule or regulation relating to levy and collection of duty or tax on goods or services or both passed or made before the commencement of this Act by Parliament or any Authority or person having the power to make such law, notification, order, rule or regulation.
GST officer is correct in his action. See bold portions.