Not a duplicate of MC-147516
Sometimes piglins could momentarily stop looking at their targets when blocking with a shield for a while or with attributes, you coul just summon a piglin with a negative value of attack damage so that it won't do any damage.
How to reproduce
In the nether:
/summon piglin ~ ~ ~ {Attributes:[{Base:-100.0d,Name:"generic.attack_damage"}]}
Go to survival mode
Do F3 + B to show hitboxes
→ ❌ Just stand there while the piglin attacks you without doing any damage. They'll sometimes forward then looks at you (Notice the blue line of sight).
Dupelicate of MC-184885