All praise is due to Allah, and peace and blessings be upon the Messenger of Allah.
This understanding is incorrect and dangerous because it combines a misunderstanding of the texts of divine promise with taking one of the gravest major sins lightly.
Ahl al-Sunnah wa al-Jama'ah believe that Muslims who commit major sins are under Allah's will. If He wills, He forgives them; and if He wills, He punishes them according to their sins. However, if they die upon Tawhid (pure monotheism), they will not remain in Hell forever.
Nevertheless, this never means that a Muslim should feel safe from Allah's punishment or become careless about committing sins. Many sinners have been deprived of repentance, suffered a bad ending, or died before returning to Allah.
Adultery (zina) is not a minor sin. Rather, it is one of the greatest major sins for which Allah and His Messenger have warned of severe punishment in this world and the Hereafter.
The Prophet ﷺ described in his authentic vision that he saw naked men and women being punished inside an oven-like pit of fire, and he explained that they were those who had committed adultery.
He ﷺ also said:
"When a man commits adultery, faith departs from him and remains above him like a cloud. When he stops, faith returns to him."
This demonstrates the seriousness of adultery, that it weakens faith and exposes a person to Allah's anger and punishment.
Whoever argues that he will not remain in Hell because he is a Muslim has overlooked several important realities:
For this reason, some of the early righteous Muslims said:
"Sins are the gateway to disbelief,"
meaning that persistent sins may lead a person to even greater evils if he does not repent.
If a married woman commits adultery, she combines several major sins:
For this reason, her crime is especially grave, and she is in urgent need of sincere repentance before death overtakes her.
The fact that a Muslim who dies upon Tawhid will not remain in Hell forever does not justify taking adultery or any other major sin lightly. Adultery is among the gravest sins, and its perpetrator may face severe punishment, be deprived of repentance, or suffer a bad ending. A sincere believer fears disobeying Allah, hastens to repent, and is never deceived by Allah's vast mercy while persisting in sin.
And Allah knows best.