You could either silicone it back in place, or simply replace it. Sounds
like either the small retaining clip has been lost or has lost it’s pizzaz
to hold it in. Or the backside section may have broken off. Simple enough
to replace and not an expensive part.
Don’t forget that on the '88’89 cars the brake pad wear sensor comes as
part of the pads; it is not a separate part. To get a new sensor, he’ll
have to replace the pads.
Coventry West, Inc.
New, Rebuilt, & Used Jaguar Parts