Minecraft wiki entry for Fox, associated text: Foxes that trust the player attack zombies, drowned, husks, zombified piglins, skeletons, wither skeletons, strays, phantoms, silverfish, endermites, spiders, cave spiders, vexes, vindicators, evokers, pillagers, ravagers, blazes, endermen, goats and pandas, when those mobs attack the player. They do not attack any mob the player attacks, unlike tamed wolves. They also do not attack zombie villagers despite the fact that they are a zombie variant.