It was an overcontribution so it would be classed as such. You're allowed an extra $2,000 without penalty but the remaining overage will be subject to the 1% penalty.
You can withdraw the excess amount and apply for a waiver of the tax withheld or submit a form T746 to claim a deduction on next year's tax return to offset the withdrawal.
https://www.canada.ca/en/revenue-agency/services/forms-publications/publications/t4040/rrsps-other-registered-plans-retirement.html