Steps to reproduce the issue:
Forceload a distant chunk (something out of render and simulation distance):
/forceload add ~10000 ~10000 ~10000 ~10000
Spawn a squid, glow squid, or bat:
/summon minecraft:bat ~ ~ ~ {Tags:["test_bat"]}
Give it a name using a name tag
Teleport the entity to the forceloaded chunk:
/tp @n[type=minecraft:bat, tag=test_bat] ~10000 ~ ~10000
Teleport it back or go to the location:
/tp @n[type=minecraft:bat, tag=test_bat] ~ ~ ~
Expected Result:
The entity does not despawn
Actual Result:
The entity despawns
Note that this does not happen with any other mob, just the 3 listed above.
Please provide the commands needed to reproduce this issue.