Problem was, if the Whigs had become(like the Republicans)consistently anti-slavery, they would have lost their southern wing. If they went pro-slavery, they would have lost their northern wing(or @ the very
least, most of it). If they tried to temporize- well, IOTL one can see where that got them. In short slavery placed the Whigs- always a party ridden by factions in the best of times*- in an impossible situation that it could not survive. In a very real sense, the party was the first casualty of the ACW.
*- Their harmony, quipped historical novelist Irving Stone, was well “illustrated by the story of the man who sat in the parlor every night holding his wife’s hand: if he ever let go, she would kill him.” Irving
Stone, THEY ALSO RAN, pp. 62-63 of the 1964, Pyramid paperback edition.