So, until 1466, Poland didn't have an outlet into the Baltic, that area being occupied by the Teutonic knights. But until 1478, they had the vassalage of Moldova.
What if, rather than reclaiming their Baltic coast, Poland had integrated Moldova the way it integrated Mazovia and Lithuania...