If Mexico didn't lose, it would only survive, maybe with a bit more of its land in the future cession area left to it if not just all of the land it already had. It wouldn't have gone on any conquest of the US.
So here's maps of a few situations I think possible for post-war.:
1) Mexico manages a ceasefire or stalemate and the war ends with no gains. Mexico manages to reabsorb Texas.
2) The war ends in stalemate/ceasefire with Mexico forced to give up claims to Texas. Texas in turn may end up a state, or remain a republic should the Texans have some reason not to join or should it be in the treaty for it to remain independent to curtail American power (Britain wanted an independent Texas to circumnavigate cotton dealings with the US, and to curtail American power).
3) Mexico does slightly better and retains about half or so and so much of its cession area territory.
4) War Ends as it did OTL
5) Mexico does worse and the US absorbs the other breakaway nations of Rio Grande and Yucatan along with Texas, or maybe just forces Mexico to recognize their independence.
6)Worst