I’ve actually seen people race with front and rear lights on their bikes like there were doing morning or night training rides.
But in a race, these are extra complications, and are totally unnecessary.
When traveling to a race, however, I usually do bring these lights just for my early morning rides a day or two before. I like to ride before dawn, but even in the daylight, it’s wise to have front and rear lights – especially in a city you’re not familiar with.
In these cases, it’s critical that you use them to stay safe and seen.
But in a race, they only serve to slow you down with added weight, make you less aero, and possibly distract others.
They are an extra variable of something you need to look after and think about which is the last thing you want in a race.
I might as well add that cameras are illegal in Ironman races, though I have seen those being used as well.
Leave the lights out of the race.