Unpaid tax carries a late-payment surcharge and can affect your credit record, so it should be settled before departure. Confirm the employer has correctly withheld the tax and settle any difference first.
Nationwide (all cities)
The consequence of unpaid tax
The general rule is that unpaid tax accrues a late-payment surcharge and can affect the individual's credit record. The Liwan district government's departure list for foreigners flags this: tax owed carries a late-payment surcharge and affects credit, so it must be settled first.
Tie to status change and settlement
This ties back to the resident/non-resident status question: if your status changed (e.g. you leave early and stay under 183 days), Announcement No. 35 (2019) requires you to report and re-calculate the tax, settling any difference. The settlement should be completed so that no tax remains outstanding. The practical anchor is to confirm with the employer that the tax has been correctly withheld during your employment, and to settle any difference (pay or refund) before you leave. This avoids carrying an unpaid-tax record into a future credit check.