I got called away while making my last post which sometimes happens.
The NEC mandates that any receptacle installed in a bathroom be GFCI protected and I would say that a light fixture that has a receptacle installed in the bathroom would also be required to be protected.
I have always protected the complete fixture when running across these items and will continue to do so.
I was in a debate a couple years back about a medicine cabinet that had a single receptacle installed on both sides inside the cabinet by two screws. The enclosure for these receptacles didn’t have enough room to make joints and came from the factory with conductors that reached up to the junction box for the cabinet light. These conductors were #16 gauge conductors.
Now the question of how to wire these built in receptacles. The electrical contractor had installed a 15 amp circuit to the opening for the medicine cabinet not knowing or caring that it came with these receptacles.
The code enforcement officer wanted them wired to the load side to the 20 amp circuit supplying the required receptacle.
The electrical contractor said they were an integral part of the equipment and outside the scope of the NEC and that protecting the #16 conductors with a 20 amp overcurrent device was against code.
In the end the receptacles were GFCI protected from a receptacle installed in the bedroom and on the same circuit that supplied the cabinet and also Arc Fault protected by the circuit supplying the bedroom. Everybody was happy. See sometimes I do come up with a pretty good idea.