If your brake lights are stuck in "on" mode when your headlights are on, something is wrong in the circuit. However...
Those bulbs have two filaments, which is why the base has two contacts: one filament is for the parking lights - that should stay lit when your parking lights or headlights are on. The other filament is for the brake lights, and should only come on when you step on the brake pedal.
Have a helper step on the brake pedal, testing it with both the headlights on and off, and observe what is happening with the brake lights. When the headlights are on, the lights should glow twice as bright when the brake pedal is stepped on, and glow only half as bright when the brake pedal is not activated. When the parking/headlights are off, the brake lights should light up only when the pedal is activated.