In NFHS:
Rule 8 Baserunning
SECTION 1 WHEN BATTER BECOMES A RUNNER
ART. 1 . . . A batter becomes a runner with the right to attempt to score by
advancing to first, second, third and home bases in the listed order when:
...
d. a pitched ball hits his person or clothing, provided he does not strike
at the ball; or
1. If he permits the pitched ball to touch him (7-3-4), or if the
umpire calls the pitched ball a strike, the hitting of the batter is
disregarded except that the ball is dead. It is a strike or ball
depending on location of the pitch.
2. If a batter’s loose garment, such as a shirt that is not worn
properly, is touched by a pitched ball, the batter is not entitled to
first base
Based on '2' there, I suspect the answer in NFHS is "It is the umpire's discretion", though I would think it would be a hit-by-pitch in this case. I don't see anything in the rulebook as far as I can find that says what 'worn properly' means.
Also, this doesn't answer OBR obviously.
EDIT TO ADD: I would trust Maven more than me on this, I'm just a beginner ump. From MY perspective it comes down to 'worn properly', which I didn't see a good citation for. ANOTHER interesting question would be: What about batting-gloves in the back pocket with the fingers hanging out? I would personally wonder if THOSE are considered part of the uniform? Another one: What about folks who wear their batting gloves with the tabs 'sticking out'? I have seen ones designed with the velcro 'reversed' such that it is part of the design...