Assuming the proper method of church discipline is followed, yes. Whether restoration and repentance occur (the intended outcome), or disfellowship (still in hopes of reconciliation, repentance, and restoration), obedience by Christ’s church always “works”, regardless of pragmatism.