Spawner Leashing

Summary

Spawner leashing only works about half the time. I've tried all sorts of different numbers. Somethings the mob will leash and go back to spawn point, Sometimes it will just endlessly follow you.

Steps to reproduce

Simply just any leash range on a spawner, LeashRange: 32, LeashRange: 20

Current behavior

Currently it works half the time and leashes, and half the time the mob continues to follow and does not leash.

Intended correct behavior

I think it should leash everytime.

Server log file

https://pastebin.com/jmc5fgNT

Debug log snippet

Nothing shows up in the debug