A non-muhsan person who commits zina gets 100 lashes with a whip and a year's exile\imprisonment. A muhsan person who commits zina gets stoned to death.
For being considered muhsan, the person must have previously lost their virginity because of permissible sexual intercourse during a lawful marriage. It does not matter if he\she is still married at the time of the committing the adultery.
لا يجب بقاء النكاح لبقاء الإحصان، فلو نكح في عمره مرة ثم طلق وبقي مجردا، وزنى رجم
Maintaining marriage is not necessary for maintaining Ihsan. So if a person marries once in his life and then gives divorce and remains unmarried afterwards - then he shall be stoned to death for committing zina.
— Encyclopedia of Islamic Jurisprudence
لا يلزم في إقامة حد الرجم أن يكون - الرجل أو المرأة - متزوجاً حال فعل الزنا ، فمن طلق أو ماتت زوجته بعد الدخول بها ، فإنه محصن إذا توفرت فيه بقية الشروط ، وكذا من طلقت أو مات زوجها ، فإنها محصنة
For enforcing the punishment of stoning to death, it is not necessary that the culrpit - male or female - to be married at the time of committing zina. So if he gives divorce or his wife dies after the consummation of their marriage - then he is still considered muhsan if all the other conditions are fulfilled. And the same applies to a woman whose husband divorces her or dies.
ولا يشترط أن يكون متزوجاً عند الوقوع في ما يوجب الرجم، فمن طلق أو ماتت زوجته فإنه محصن إذا توفرت فيه بقية الشروط، وكذا طلقت أو مات زوجها
It is not a condition that the person is in a marital relationship when he commits an action that entails stoning him. Instead, anyone who divorced his wife or whose wife died is considered Muhsan if he meets the other conditions. The same applies to a woman who is divorced or whose husband died.
—Islamweb - Arabic English