Showing error while settling advance made in Dec'20

Made an advance payment to a supplier in Dec’20 and now while settling the same in Feb’21 against an invoice or submitting the invoice, it is showing error - " You cannot create or cancel any accounting entries within in the closed Accounting Period Dec-20 - UASL"

Do we need to open Dec’20 period for adjusting this advance? This wouldn’t be in accordance with a matching principle.