This is what I could find on Perplexity.ai. It seems to be a Microsoft problem, not a you problem.
Lock Screen Lighting Conflicts
The core issue stems from how Dynamic Lighting handles lock screen states. According to manufacturer documentation, many keyboards experience lighting changes or complete shutoff when the system locks, particularly when Dynamic Lighting is managing the device35. This is because Dynamic Lighting doesn't maintain consistent settings across different system states like active desktop versus lock screen5.