first insure the old bulb and replacement bulb are identical, parts guys are not rocket scientists.
have a close look at the contacts in the bulb socket.
swap the bulbs from right to left.
that should get you started.
I have changed the bulb more than once.Both elements are good in the bulbs.Brake lights work until the head lights are turned on.The brake light quits working if the head lights are turned on.
its obviously a feedback of some kind, time to consult a wiring diagram, which i dont have :(
relisting your question now so someone can send you one.
good luck, gary