You’ll have to replace the malfunctioning taillight unit.
I’ve seen references here and there to an extended warranty for the issue:
https://www.bimmerpost.com/forums/sh...php?p=30241082
And there are many other threads on this topic that are an easy search away:
https://f87.bimmerpost.com/forums/sh....php?t=2001108