The tiny slime and the tiny magma cube jump the same height, which is not high enough to clear the fence. But both the medium and large slimes and magma cubes jump high enough to clear the fence. However, none of the slimes can actually get over the fences and all the magma cubes can.