From my layman’s view, they argued that the existing law did not cover sexual orientation, while the 6 argued that “on the basis of sex” does despite lawmakers making no mention of it in the bill.
That’s not such a wild stretch, but it is reading more into the law than was written or intended at the time, so peeling 2 textualists off is a bit surprising.