when you do /execute at @e[type=player] run tp @e[type=<entity>] ^ ^ ^-2
it just says in the command block; an entity is required to run this command, but if you change it to be as instead of at, then the entity gets teleported at the command block! It's really annoying, hope this helps.
Comments 3
But you should be able to use the command block to teleport entities relative to where a mob is facing, and not at the command block.
execute as is needed, as changes what runs the command (and what the rotation values for local coordinates are).