We have a Cessna 150 with an electrical fault. When you switch the ignigtion switch to the both magneto position, electrical power is lost. Switch the ignition switch back to either the left or right magneto and the power comes back on. If you remove the switch leads fromm the magnetos, switching the battery master on has no effect.
These switches typically have a fixed disc shaped circuit board with a printed circuit pattern, and a rotating element driven by the key with contacts that rub on the board and close or open circuits as the contact assembly rotates when you turn the key.
Not having the internal circuit diagram of the switch to work from, I can only make wild guesses. It almost sounds like the battery terminal on the switch is finding a ground path through the magneto P-lead or even the P-lead shielding at certain key positions and breaking contact at others. This suggests something is loose inside the switch. If you don't want to drop 200 bucks on a new switch, try to borrow one from another aircraft and see what happens.