While playing around with the /tp facing commands I found out that it doesn't work properly with the wandering trader mob. This is the only mob I can tell which has these two problems:
The wandering trader doesn't face the target along the y-axis, only along the x-axis
The wandering trader's rotation nbt doesn't actually seem to follow along with where it's actually facing when the /tp facing command is used. For example, the tp facing could make a wandering trader look like it's facing to the north (which is also indicated by the f3+b tooltip), but it's rotation nbt says that it's facing to the south (which mean that the carets ^ ^ ^ along the forward/behind direction thinks that "forwards" is the south here).
Please provide the exact commands you are trying to use.