This depends upon whether or not the child still mouths objects.
A bit of dirt/sand in the mouth won't be harmful, but handfuls could become a problem, not to mention small toys/debris in the sandbox that could pose a choking
hazard. Most kids stop mouthing objects around 15-18 months old but for some it may continue beyond age 2. Lastly, kudos for encouraging outside playtime!