If sinner is a brother or sister in Christ who refuses to turn from that sin, 1 Corinthians 5 states we are to turn that person out. We are not to continue associating with such a person. The goal is always restoration of the sinner, but we cannot remain in fellowship with a open and unrepentent sinner...it would be tacit approval of the behavior.
That’s right. Of the behavior, as you say.