The manual is (not surprisingly) rather light on info about the park brake switch, but it's adjustable and located on the left side of the lever. You have to remove the centre console to get to it.
I'd look at adjusting that, unless the vehicle is still under warranty - in which case I'd be asking the service manager why it's playing up.
I don't think there'd be any special logic (like there is for the gearbox) involved. It's a very simple item and it makes no sense for the ECU to be making decisions about the park brake state. It ought to be an adjustment thing.
If you're stopped (engine idling) and the handbrake is completely off, how much can you lift the handbrake lever before the light comes on? If it's just a light touch and it's already on, it's definitely an adjustment thing. You should be able to lift the lever a good few mm before it comes on. The manual specifies "1 notch" before the switch engages, and "9-10 notches" before the handbrake holds the vehicle.