Even if the mob is name tagged it still despawns. I ran a few tests in my survival world with a whole lot of name tagged villagers and when I relogged and went through the portal to my village, almost all of them are gone.
I've been experiencing this bug also. I'll leave the area or log out, and when I come back about 90% of all of my entities, including ones with name tags, have despawned.
Even if the mob is name tagged it still despawns. I ran a few tests in my survival world with a whole lot of name tagged villagers and when I relogged and went through the portal to my village, almost all of them are gone.