Whole Foods had argued that the masks were against the company’s dress code, which applied to all employees of all races and to masks featuring logos or writing of any kind.