I've no specific advice for your Peugeot, but a problem like this would point to a bad earth/ground wire on the brake light circuit. Have a look at the wiring for the rear light clusters and see if there is a wire bolted to the bodywork and check this is not rusty or loose.
Rupert
February 2020