The Bug here is that the Tamed Wolf will go after the Mob once you punch it, but with hostile mobs hitting you back after you punched them, the Tamed Wolf will stop attacking the targeted mob you hitted. (This happens to all Hostile Mobs, including Pillagers with their Crossbow)
A seperate note: They will attack again if The Hostile Mob you targeted hits you one more time.
A video down below shows the Bug.
Have a splendid day!
-Th0mas
The described behaviour cannot be reproduced on 1.15 Pre-release 2.