Not a bug
Burning Crusade Classic "Not a Bug" List - May 25, 2021
When pets are sent to attack an enemy and that enemy enters stealth, the pet will continue to follow the stealthed unit around but will not directly attack them until the unit breaks stealth or can be seen by the pet’s owner. This is correct and matches original Burning Crusade pet behavior.