The group of scholars have differing views. The critical concern is whether the nail polish forms a barrier preventing water from reaching every specific portion of the nail during ghusl. If it does, it could invalidate the ghusl, according to some interpretations.