Where the feet are matters for the batter being in a legal batting position in general. But for hit by a pitch, the ball location of inside or outside the box when it hits a batter can also matters. Here is the relevant NCAA rule:
7-4 A Strike
Quote:
A Strike is
...
i. Awarded if the batter is judged to intentionally make a movement to be hit by a pitch, regardless of where the pitch is located; or allows themself to be intentionally hit by a pitch that is not thrown within the boundaries of the batter's box unless it was not possible to avoid being hit
If the batter is crowding the plate (even with their feet on the line in the batters box) with their elbow/arm/hand leaning outside of the box, the umpire can award a strike on the batter for a hit by the pitch if they think the batter could have avoided being hit.
If the ball is in the box they don't have to get out of the way, but if it is outside the box they have to try and get out of the way if possible.