Boruto tries to escape from Konoha by erasing his presence, Code takes advantage of the confusion to attack Konoha, thanks to the confusion Boruto manages to escape from the village.
A few years later, Boruto returned to the village and saw Konoha destroyed.