Finite groups with isomorphic non-commuting graphs have the same nilpotency property