Some bikes are suffering from a faulty brake sensor, usually the rear one. If the stop light is permanently turned on, this is likely the culprit. The fix is to replace the sensor under warranty, they are just defective from the factory. This requires removing the fuel tank.
The sensor seem to be self-calibrating, as such some stop and go action sometimes recalibrate the sensor and the problem fixes itself.
Push come to shove, replacing the switch is relatively easy (you just need to remove the fuel tank to get access). See this post on advrider by AdvRonski. The switch itself is even available on Amazon (but will require a bit of soldering to adapt the connector, so prefer the KTM part: front p/n 64111051100, rear p/n 62111051000, the only difference between the two appear to be the connector)