Notwithstanding any other provision of this article, the retirement of a member who has been granted or is entitled to sick leave or who is entitled to compensating time off for overtime, shall not become effective until the expiration of the sick leave with compensation and the expiration of the compensating time off with compensation, unless the member applies for or consents to his or her retirement as of an earlier date, or unless, with respect to sick leave, the provisions of a local ordinance or resolution or the rules or regulations of the employer provide
to the contrary. This section shall also be applicable to a state member who participates in the annual leave program and who has been granted annual leave for the reasons applicable to sick leave.