At some point during the war, his body was encased within Guruguru, seemingly using Yamato's altered DNA to strengthen its own Wood Release. After the true Madara Uchiha activated his Infinite Tsukuyomi, Yamato was freed from within Guruguru's body in an unconscious state, as he had no further use to Guruguru. He was then immediately caught in the genjutsu.