Glad to help. Many other people here are much more qualified than I am.

Quick test. I assume this is a two coil contactor. One coil closes contactor, the second coil opens contactor.

____If it is safe to do so_____ isolate the neutral wire on the close coil. If the coil shorted to frame, it should still trip the main. If it still trips with the coil neutral wire disconnected, isolate the line side wire of the coil. If it still trips, then it sounds like the switch wiring is grounded.

good Luck.