You can't see very well because the mob is whirlwinding, but there's a small pillar preventing them from going further.
I don't think this would work with other enemies aside from the big stone golems. The spot is right next to the entrance, but there are probably other places in the cave with the same layout.