I checked the rule and yes it was a penalty for this reason: the ball left the tackle box. If the ball leaves the 3 yard window behind or in front of the LOS, it becomes a penalty. When the QB handed the ball to the RB, the ball exited the 3 yard window at which point it is not close line play
Found a reference to the ball leaving the tackle area, and it calls out that this specific instance is not a penalty:
"ARTICLE 7. BLINDSIDE BLOCK
It is a foul if a player initiates a block when his path is toward or parallel to his own end line and makes forcible contact to his opponent with his helmet, forearm, or shoulder.
Note: It is not a foul for a blindside block if the forcible contact occurs in “close-line play” prior to the ball leaving that area.
The ball is not considered to have left that area if the player who takes the snap, either from a shotgun position or from under center, retreats in the pocket immediately or with a slight delay, and hands the ball to another player, or runs with the ball himself. This exception does not apply to any action other than a designed play. Any forcible contact in “close-line play” is still subject to the restrictions for crackback and peel back blocks."