This may be as simple as a slightly worn stereo jack in the headphone. All stereo plugs have three wires; L, R, and ground. You can see the male plug having a center, left, and right mechanical configuration with plastic spacers separating each part of the plug, The female jack is designed to mechanically switch between internal or external speaker sources of signals. When connecting the plug, the L and R circuit are broken to allow external signals to the speakers. When disconnecting the plug, the L and R connections are remade for internal signals. You'll have to disassemble the side with the jack to see it. Google images of stereo jacks. Most likely the R side connector isn't contacting its metal prong to allow internal signal source.