Minecraft wiki entry for Villager, associated text: Wandering traders also drink a Potion of Invisibility at night (or when they see a hostile mob such as an illager or zombie). In Java Edition, they drink a milk bucket in the morning to remove the Invisibility. They despawn after 40-60 minutes (even with a name tag or in a minecart or boat) with their llamas, and sooner if all the trades are locked.