Some of us sent our beards in envelopes to the Commandant. But we shaved 'em.
You have my gratitude. Guard duty is harsh and boring, but absolutely imperitive.
I did a few years in the USMC, cold war.
The only Marine officer I ever saw with a beard was an black American who obviously had a shaving chit because of 'pseudofolicularitis' (shaving bumps). He was giving some private a good toasting for not being alert on duty, and well deserved. The private in this question was on guard around our armory. He failed to salute the Lt. This indicates that the private was asleep on his feet or was stupid.
Anyway, you have to shave to use a gas-mask or OBA. This is very unfair to those who suffer from pseudofolicularitis. War is also unfair and does not care about anyone's 'rights'.
In the middle '80s I was stationed with a black Marine who paid out of his own pocket to have his facial hair removed by electrolysis. He couldn't shave, and he didn't want to leave the Corps. (No, the Corps wouldn't pay for that back then.)