The bug
Ghasts, magma cubes, slimes, fish [...] and all the mob that don't use the traditional random strolling type movement that normal mobs use, can move outside the 32 blocks of range causing lag.
How to reproduce
Spawn some zombies and some slimes
Go in spectator mode
→ Zombies can't move, slimes can
Comments

Can confirm that this issue is still present in 20w51a.

Can confirm in 1.17.1 Release Candidate 1.

Tested in single-player, in spectator mode (MC-227635). This affects axolotls, bats, bees, ender dragons, foxes, ghasts, goats, hoglins, magma cubes, phantoms, piglins, piglin brutes, slimes, turtles, vexes, villagers, withers and zoglins. This does not affect fish anymore.

Can confirm in 21w42a.

Can confirm in 1.21.
Demonstration video
https://i.gyazo.com/6b6fd1ec394dcc0341cdd2eb5c8a280b.mp4