Zombie villagers that are in the process of converting do not despawn if the player moves far away from them, but like all monsters, they despawn if the difficulty is changed to Peaceful. Specific to Java Edition. If a zombie villager was a nitwit before it was transformed into a zombie villager, it remains a nitwit.
Zombie Villagers you’ve traded with previously will never despawn. Use the Splashing Potion of Weakness on the Zombie Village to apply the Weakness effect. You can also use Tipped Arrows
90. Jan 25, 2022. #3. jonaskos said: 1. So if I get villagers, do they despawn after I rejoin? (if despawn does nametag prevent) 2. If I have a witch (which will despawn) and I put a nametag on it, will it still despawn? villagers wont despawn and named mobs wont. This could be a problem with your computer. As @creulcat said, Please include more information in your question. Option 1: Please turn off your computer, leave it to cool off, turn it on, open Minecraft, comment if it worked. Option 2: If Option 1 didn't work, try this: Launch Minecraft with more RAM, comment if this worked.
It won't stop mobs from spawning but the second they spawn they will die. You first give yourself a command block. Then, type this command: /kill @e [type=zombie] This example will kill zombies. Set the command block to repeat and always active. You can type any mob name in place of the word zombie but you have to individually put in a command
Steps to Reproduce: Spawn a villager. Place a bed and workstation block. Wait for the villager to link up to the workstation. Break the workstation block. Turn the villager into a zombie villager. Place a minecart or boat nearby and try to get the zombie villager to enter it. 7HS2. 116 329 174 349 251 2 241 362 108

how to make zombie villager not despawn