Minecraft wiki entry for Wandering_Trader, associated text: The wandering trader despawns along with its leashed trader llamas after 2-3 days, which is 40-60 minutes of real time. Naming the wandering trader with a name tag or placing the wandering trader in a boat/minecart does not prevent it from despawning. This also includes wandering traders as passengers of other mobs in Java Edition, where the wandering trader still despawns if summoned on top of another mob. In Bedrock Edition, unleashed trader llamas may never despawn, even when unnamed and/or left in unloaded chunks.[1]