One acceptable option is to take the Greek preposition translated for (eis) as because of or on the basis of. This is not the usual meaning of the word. The usual meaning is for designating aim or purpose.
However it clearly means because of in some passages (e.g., Matt. 3:11; 12:14; Mark 1:4).
This explanation links forgiveness with baptizing. We could paraphrase this view as follows. Repent and you will receive the gift of the Spirit. Be baptized because your sins are forgiven.171
Constable, T. (2003). Tom Constables Expository Notes on the Bible (Ac 2:38).
One receives forgiveness of sins and the Holy Spirit at the same time. Knowing that, the correct way to translate Acts 2:38 is quite clear and that is why every reputable translation has for the forgiveness of sins, not because of. See Acts 22:16 for confirmation baptism is for the remission of sins and doesn’t follow the remission of sins.