I’m teaching it in my adult Sunday School class. You’re not saying that verse 24 says that God turns people into homosexuals because of their sin, are you? I can’t stretch Paul’s words anywhere near that conclusion.
He doesn’t turn them into anything. It’s His mercy that restrains all of our sinful desires and shameful lusts. For those who He does not call, who know the truth but suppress it with their wickedness, He hands them over, just as Peter was handed over. It is a dreadful thing to fall into the hands of the living God. Read Hebrews 10:26.