@Chuck Sartor, while TVS diodes usually are recommended and used across track power for transient protections (and I support that use), I see this as a completely separate discussion here specifically around reducing the arcing in the switch contacts.
I did the experiment of adding a TVS as @gunrunnerjohn proposed and @SteveH clarified and saw no improvement with the sparking at the whistle switch.