Hello,
Are you certain the switch is good and the contacts are clean?
I was never a fan of having a programming track that was a part of the layout trackage. I remember reading in the early days of DCC 'no-no' practice that the risk of bridging the usual DCC current/signal onto the programming track or vice-versa could be catastrophic. Some diagrams were made showing an isolation section of track to act as an insurance 'buffer' so that something as simple as one wheel bridging the gap would not scramble signals or destroy decoders.
Speaking of gaps, how good is the integrity of the gaps between the layout trackage and the part-time programming track. Even some scenery materials might compromise the insulated gap sort of forming a 'semi-conductor'.
Good Luck, Ed