Once the permanents referred to by Deputy of Detention's ability are exiled while Deputy of Detention is on the battlefield, those cards will return to the battlefield immediately after Deputy of Detention leaves it, even if Deputy of Detention has no abilities by then (C.R. 610.3, 610.3b).
EDIT (Jul. 2): The relevant part of one rule was moved in the Core Set 2021 update.
The exile's duration ends with the Deputy leaving the battlefield and returning the exiled card, wether it still has the ability or not, because the effect only cares about the Deputy staying on the battlefield. In contrast, something exiled with Fiend Hunter would not return, because this is not a duration, the exiled card would be returned by an ability, and if that ability does not exist, the card does not return.
EDIT (Jul. 2): The relevant part of one rule was moved in the Core Set 2021 update.
Former Rules Advisor
"Everything's better with pirates." - Lodge
(The Gamers: Dorkness Rising)
"Any sufficiently analyzed magic is indistinguishable from science."
(Girl Genius - Fairy Tale Theater Break - Cinderella, end of volume 8)