If you read the suggested page in the troubleshooting manual you will realize unplugging the wire will only tell the transmission the brakes are on all the time.
If you are going into limp mode with the TPS plugged in you must start there anyway, the transmission will NEVER work correctly without the TPS and if plugging it in puts the transmission in limp mode then you have a problem with the TPS, or the TPS circuit,,,you need to start there and do some troubleshooting rather than just plugging and unplugging stuff.
Have you read the codes with the TPS plugged in and after confirming it is in limp mode?
Have you checked the signal voltage coming from the TPS?
Do not worry about the brake switch until you figure out why the transmission goes into limp mode with the TPS connected...