The rule governing batted balls lodging inside a player’s uniform is not explicitly covered in the Major League Rules document, but in the Major League Baseball Umpire Manual, which offers further interpretation of rules deemed not explicit enough to cover a given situation such as this. That was the case here.
This play was covered in the umpire manual under Rules Interpretation #6, Ball Going Into Player’s Uniform:
If a batted or thrown ball inadvertently goes inside a player or coach’s uni-
form, lodges in the catcher’s face mask or paraphernalia, or is intentionally placed
inside a player’s uniform (e.g., in a pants pocket), the umpire shall call “Time.” The
umpire will, using common sense and fair play, place all runners in such a manner
that, in the umpire’s judgment, will nullify the action of the ball going out of play.
That being said, if the umpire determines that the player placed the ball in his
uniform intentionally for the purpose of deceiving a base runner, the umpire will
place all runners at least one base (or more if warranted, in the umpire’s judgment
in order to nullify the action of the ball being put out of play) from the base they
originally occupied. In no case may any outs be recorded on such play.
For the purposes of stopping play and ruling the ball dead, it doesn’t matter whether the lodging of the ball within the uniform is intentional. The only way intention factors into this interpretation is the decision to move the runners up a base (lodging is intentional: yes; lodging is unintentional: umpire discretion).