If an NPC attacks a PC A who is defended by another PC B, PC B will properly defend PC A and take the attention of the NPC. However, the NPC can switch attention during combat, at which point they successfully attack PC A. Defend should prevent this per help file: The defend command will allow you to jump in front of your little pal when something attacks them, directing the fight to you instead.
If an NPC attacks a PC A who is defended by another PC B, PC B will properly defend PC A and take the attention of the NPC. However, the NPC can switch attention during combat, at which point they successfully attack PC A. Defend should prevent this per help file: The defend command will allow you to jump in front of your little pal when something attacks them, directing the fight to you instead.