Your account generally doesn't close automatically the moment you leave, but many resident account benefits and terms are tied to maintaining UAE residency status, so a bank may eventually reclassify or restrict the account, particularly if your residence visa is cancelled and the account's minimum balance or salary transfer conditions are no longer met. It's generally advisable to formally close or convert the account to a non-resident status where offered, or settle any outstanding cards and loans, before departing, rather than simply leaving the account inactive.
Check your own exact figures with the Bank Account Finder - free, in under a minute, no sign-up required.