Historically, Lithuanian-Muscovite alliances were highly fragile things. When Vasily came into an alliance with Vytautas through marrying his daughter, that didn't stop Moscow and Lithuania from waging war against each other during both of their lifetimes.
Poland is going to either have Siemowit III on the throne or Jadwiga remaining as King of Poland with the unpopular, but presumably tolerable William of Austria as her consort. Either way, Lithuania is not going to be stable for anytime soon, during the time when the marriage between Sophia and Jogaila was proposed (in 1384), Vytautas was already free from prison and allied with the Knights to try to take the throne for himself, so Poland's role is quite important here. They're probably likely to go neutral, but they could theoretically support one side over the other.
If Dmitry Donskoy dies on schedule in 1389, then Jogaila could theoretically press a claim on Moscow while Vasily I is still young, and thus remove Moscow from the equation to have Lithuania be the sole major force in East Slavic politics, but that's assuming Lithuania has the power to do so.