That's not part of Sharia law. In Islam the crime of sex outside of marriage requires a public penetrative act that is witnessed by 4 adults; basically equivalent to having sex in public in the west which is a jailable offense in many US states.
Alternatively, the accused could both do a confession in front of a judge 4 separate times but they can retract this confession at any time and avoid any punishment.
Looks like you didn't read what I posted. Its only a crime if you do it publicly in front of people and they report you just like in every country in the civilized world. Sex outside of marriage is considered a sin but not a crime unless it meets the specific criteria I posted.
It's also worth noting that in the most minimal reading of Sharia the punishment for adultery is whipping, not stoning, as stoning isn't mentioned in the Quran, only in a statement written down a couple hundred years later by someone claiming he heard someone claiming he heard that a sheep ate the page that mentioned stoning (https://sunnah.com/ibnmajah:1944).
Alternatively, the accused could both do a confession in front of a judge 4 separate times but they can retract this confession at any time and avoid any punishment.