Detention is like the topping on a dessert, you might say! (7)
I believe the answer is:
custody
'detention' is the definition.
(I know that detention can be written as custody)
'like the topping on a dessert you might say' is the wordplay.
'like the topping on a dessert' becomes 'custardy' (like custard).
'you might say' shows a homophone (sound like).
'custardy' sounds like 'CUSTODY'.
'is' is the link.
(Other definitions for custody that I've seen before include "Protective care" , "Keeping - detention" , "Guardianship or imprisonment" , "lock-up?" , "State of being detained by the police" .)