I have not seen this in the issue tracker, but had a zombie pigman in between (3 blocks away) from two mega portals in the overworld for a gold farm. He had a name tag applied to him and we would punch him to force other pigman to fall into the gold farm trap...afterwards we would spray him generously with harming potions so he would stay at full health...when we left the area and came back he would have despawned...this happened twice.
I have since placed armor on the pigman and named him believe it is working as intended...trapped pigman is surrounded by iron bars so there is no escape. Not sure if this is a bug or if entities will despawn even with a name tag applied. Can provide snaps if needed but it seems pretty self explanatory. I do believe he is also far enough away from the portals as you can stand directly under him without being affected by the portals yourself so I do not believe he is porting back to the nether...like said, works fine while we are there but not after we leave the area.