This behaviour can be configured in the settings of the Account definition for the relevant domain. Specifically, this is defined in the
Manage Level of the account. For example, for Full managed accounts:
If "Retain groups if temporarily disabled" is selected and the Employee is temporarily disabled then the group membership will remain.
If "Retain groups if permanently disabled" is selected and the Employee is permanently disabled then the group membership will remain.
For more information, please refer to the Administration Guide for the appropriate target system, e.g.:
Creating an account definition and
Setting up manage levels.