Is this a seperate and additional jobbie from the existing rear-stop/tail light or a LED replacement for the normal bulb?
The issue may be the can bus as suggested but it does depend exactly what you've got.
The computer expects to measure the amount of current associated with a normally functioning tungsten filament in both the stop and tail lamp.
If it measures too much it thinks it's a short and will cut off that circuit for safety. If it measures too little it thinks the filament has blown but its gets quite smart as if the tail lamp has gone, it switches the brake light on but at half power in order to look like a tail light so that people can see you and not run up yer chuff in the dark.
Now then, LEDS don't use nearly a smuch power as a filament so will look to the computer as a blown bulb. All replacement LED's for canbus bikes need an additional resitor in parallel with the LEDs in order to provide enough load to fool the computer into thinking it's seeing a working bulb.
If you have bought a replacement type you need to check this aspect.
If you have bought a secondary lamp, you may be overloading the circuit and causing it to shut down. Tell us what you've got and we'll go from there