When slimes and lava slimes move, they do not avoid any potential damage (void, lava, etc.), so in void biome, they randomly jump out of the platform into the void. When trying to attack players, slimes jump into lava without avoiding it.
Steps to reproduce:
1. Summon a slime or lava slime on the platform
2. Watch, it jumps off the stone platform and dead
3. Summon a slime next to a lava pool
4. Walk to the other side of the lava pool
5. Change to survival mode
6. Watch, it jumps into the lava to chase player and dead