This is a logic bug that affects also vanilla Minecraft 21.1.2, but whose fix is fairly trivial and could be added here I guess until Mojang fixes it upstream.
When a leashed wolf is passed through a portal, in Entity.teleportCrossDimension a new entity is created and the `home_pos` and `home_radius` NBT properties which define the leash holder position are incorrectly copied. Then the this.mob.isWithinHome(target) check in TargetGoal.canAttack fails, so wolves simply stop attacking entirely.
There's a more complete explanation at https://report.bugs.mojang.com/servicedesk/customer/portal/2/MC-307839?created=true
The fix is trivial: move the chunk of code that unleashes entities in removeAfterChangingDimensions() BEFORE copy.restoreFrom(this) in Entity.teleportCrossDimension is called. Thus the NBT home_pos and home_radius fields are (properly) unset when copy.restoreFrom is called, so the cloned entity does not have them.