The tricks are, make a roof with a two high gap for you to hide in (they're three high and so can't come underneath)
Get one angry at you, preferably by hitting their feet so they don't teleport, but if they do, that's alright too
In both cases, run back to underneath your roof you constructed...