On either switch, front or rear, follow the wires to where they plug into the harness. Unplug the wires, does the brake light go out? If so then the switch has a problem.
On the front it has a pin that comes out and hit the brake lever. In the closed position the switch contacts are not touching. When you pull the lever the pin, under spring pressure move out, letting the contacts close sending power to the brake light.
If the clips that hold the switch in are eak or broken this lets the sdwitch move out of the perch and the contacts close.
I looked up the rear brake switch on boats.net. It is mounted on the side of the bike It has a springloaded linkage to the brake linkage. The switch has a plastic nut on the body of the switch. You adjust the nut to get just a bit of slack in the spring loaded linkage. Not enough slack and the brake light stays on, to much slack and it never comes on.
Leo