The Bible does not teach that one must always make restitution for their sins in order to be saved, it's just that doing so is an attitude that is consistent with the contrite heart of repentance.
Note that King David was guilty of adultery and yet married Bathsheba after the affair. Yet, upon being confronted by Nathan the prophet, David writes Psalm 51, where he confesses his sin with a contrite heart:
Have mercy on me, O God,
according to your steadfast love;
according to your abundant mercy
blot out my transgressions.
Wash me thoroughly from my iniquity,
and cleanse me from my sin!
For I know my transgressions,
and my sin is ever before me.
Against you, you only, have I sinned
and done what is evil in your sight,
so that you may be justified in your words
and blameless in your judgment.
Behold, I was brought forth in iniquity,
and in sin did my mother conceive me.
Behold, you delight in truth in the inward being,
and you teach me wisdom in the secret heart.
Purge me with hyssop, and I shall be clean;
wash me, and I shall be whiter than snow.
Let me hear joy and gladness;
let the bones that you have broken rejoice.
Hide your face from my sins,
and blot out all my iniquities.
Create in me a clean heart, O God,
and renew a right spirit within me.
Cast me not away from your presence,
and take not your Holy Spirit from me.
Restore to me the joy of your salvation,
and uphold me with a willing spirit.
Then I will teach transgressors your ways,
and sinners will return to you.
Deliver me from bloodguiltiness, O God,
O God of my salvation,
and my tongue will sing aloud of your righteousness.
O Lord, open my lips,
and my mouth will declare your praise.
For you will not delight in sacrifice, or I would give it;
you will not be pleased with a burnt offering.
The sacrifices of God are a broken spirit;
a broken and contrite heart, O God, you will not despise.
Do good to Zion in your good pleasure;
build up the walls of Jerusalem;
then will you delight in right sacrifices,
in burnt offerings and whole burnt offerings;
then bulls will be offered on your altar.
(Psalm 51 ESV)
And what is God's response?
David said to Nathan, “I have sinned against the LORD.” And Nathan said to David, “The LORD also has put away your sin; you shall not die.
(2 Samuel 12:13 ESV)