Following more than a decade of military reform, spearheaded by crown prince Abbas Mirza, and a minor but victorious border war against the Ottoman Empire, the Qajar dynasty attempted to reconquer the territories it lost to the Russian Empire more than a decade before, in the Treaty of Gulistan. I found very little concrete information on this war so far, but it seems the Iranians (who apparently outnumbered their enemies) captured a substantial amount of land in modern Azerbaijan before being driven back by a Russian counteroffensive and losing what little grasp they still had left over the Caucasus in the Treaty of Turkmenchay.

Did Persia have any chance of winning? Abbas Mirza's reforms were hampered by the fact they were mostly restricted to the province of Azerbaijan, which he governed directly, and had a lot of opposition from other Qajar princes, who saw them as a threat to their own interests since they'd greatly strengthen his claim to the throne if they were more successful. What if he had some more support from his father back in Tehran, perhaps because the cash-strapped and often unstable Qajar state gets a lucky break of some kind in the years preceding the final war with Russia?

Are the borders in the map below plausible? Assuming Russia loses, would they let this defeat slide, or would they try to retake Azerbaijan a few years later?