OEM yamaha starter solenoids are fairly reliable if not abused.
Some Abusive conditions:
Weak batteries, low battery voltage
Poor, corroded electrical connections
Excessive cranking
If the solenoid gets hot, then it can weld shut like you describe. If your new/used solenoid is oem and did the same thing as your old one, then I would look for other electrical issues that may be contributing to the problem.
Check for:
*Loose, corroded battery ground cable at both ends and throughout the cable.
*Loose stator/stator grounds
*Loose, corroded power cable from battery to solenoid and from solenoid to starter
*Check solenoid ground in ebox