Can LM7806 be used in the brake light circuit?

I made a motorcycle LED brake light with a voltage regulator block LM7806 because the red LED single voltage is 2V and three groups are connected in series. Will the performance of the 7806 be affected by frequent braking?
Thanks in advance.

Why didnt you just get a 12volt M/C brake light bulb. easier and you dont need to re-invent the wheel