I always go completely clean shaven with a bald head when I interview.
Nevertheless, once you go there in person for your interview, people will notice anyway.
In the USA discrimination is 100% legal if 1) the group being discriminated against is not specifically defined as a protected group under law OR 2) it's a legitimate job requirement.
Requiring programmers to know how to program also discriminates against non-programmers but non-programmers aren't a protected group.
Requiring a stocker to be able to lift 30 pounds discriminates against the disabled. The disabled are a protected group, but it's a legitimate job requirement for a stocker to be able to move the stock around.
If you're hiring for a senior engineer it's not illegal discrimination because 1) it's a legitimate job requirement and 2) young people are not a protected group under law (only people over 40 are)