Vanishing and cocentralizing generalized derivations on Lie ideals