This sounds like the transformer insulation may be failing. This could be very serious. The primary of the transformer is separated from the housing and the secondary by what can be a thin layer of insulation. If it fails there is a direct short of primary to the case or the secondary. Either is very serious and can be dangerous.
The transformer should be thoroughly tested immediately and repaired. To be safe reconfirm the proper grounding of the machine to insure personnel safety.
TRANSFORMER SUBASSEMBLY
PRIMARY & SECONDARY
References: RWMA – Resistance Welding Manual 4th Edition
AWS Standard J1.2, Guide to Installation and Maintenance of Resistance Welding Machines