On my Keychron K3 there is a key combination that deactivates the light-pattern-changing key. Now, if I accidentally hit it, it just flashes a couple of times and goes back to the setting I had it on. Check your manual.
This sounds interesting, I popped the key cap off that button and also the print-screen button since I was amassing a sizable collection of accidental desktop screenshots!
Edit: It's not in the K2 manual but there is a shortcut, FN + L + lightbulb key that works to lock it -