When a piglin and a hoglin are in the same team (generated with commands) they still attack each other. A zoglin attacks all the other creatures even if they are in his team. These two observations remain valid even when the friendlyfire in a team is disabled. In comparison when a wolf is adopted he takes the team of the player who adopted him and if a skeleton is on that player’s team, he’s not scared of the dog anymore.
When a piglin becomes a zombified_piglin, a hoglin a zoglin and a zombie a drowned and they have a predefined team, after their transformations they lose their teams and stay without team.
Thank you for your report!
We're actually already tracking this issue in MC-172304, so I resolved and linked this ticket as a duplicate.
If you would like to add a vote and any extra information to the main ticket it would be appreciated.
If you haven't already, you might like to make use of the search feature in the future to see if the issue has already been reported.
Quick Links:
📓 Issue Guidelines – 💬 Community Support – 📧 Customer Support – ✍️ Feedback and Suggestions – 📖 Game Wiki