How was he reborn ?

how did he become an ant and was reborn when all his parts were intact and used again by Pitou as a puppet and he wasn't eaten by the queen.