Whitening gel lightens natural enamel only. Crowns, veneers, implant crowns and tooth-coloured fillings stay the same colour, so they can look darker once the teeth around them have lightened.
Your dentist checks this before whitening. If a mismatch would show, the options include a gentler shade, or replacing the restoration afterwards to match.
Most people do not think about their fillings until after whitening, when a small grey-yellow patch appears on a front tooth that was never noticeable before. It is easy to avoid that surprise by looking at existing dental work first.