You need two things firstly;
1. Keep America out of WWI; the entry into WWI and the subsequent Espionage and Sedition Acts were a major part of the death of the Socialist Party as they gave the government the de facto power to silence opposition, and the SPA was heavily targeted not just because of its general ideology but also because it was vocally against the war.
2. Get better and more pragmatic people in charge, people who are willing to compromise in the short term or on minor to moderate things to gain in the long term; the whole Class War thing has never been a thing in America to the extent as in Europe and elsewhere, however Americans were aghast at working conditions, sanitation (or lack thereof) and the more overt Robber-Barons, so going after those issues and eschewing lesser and more ideological things is the best route.
The socialist's could certainly fill this pact especially if some worker's party is able to unite the populists and progressives early on. I could see America having a "Worker's Party" as a major political force.
I don't really see America becoming anti-War if they lost, at best it'd become 'They're horrible, but we're better off without them, but we also need to make sure we curbstomp them if they try anything.'.
Also, one big thing to note is that the early Labour Movement in the United States was incredibly racist, for example one of the first organizations in California had at the heart of its platform to expel all Asians since they were being brough in to do the job more cheaply, and in the East their were cases of northern movements not liking the Southern blacks coming in.