If the Warden is far away, the Warden has a chance to just despawn, even if you keep distracting it from a distance. The Warden is not digging down to despawn and it is instead just disappearing.
Steps to reproduce:
- Summon a warden
- /tp @s ~-130 ~ ~ -90 0
- /tp @s ~130 ~ ~ -90 0 (Or you can just fly back to where the warden was summoned)
The warden has despawned immediately because the warden is over 128 blocks away.
It can also despawn randomly if it is in between 32 blocks and 128 blocks away as seen in the picture above.
The Warden should only despawn when digging into the ground.