Iron Golem can attack a mob from 3-4 blocks away unlike on java edition it only attacks a mob within 1-2 blocks away from it this has been a bug since 1.9 - 1.16
Steps to reproduce:
1.Grab any hostile mob spawn egg (Vindicator spawn egg recommended)
2. Observe the fight of iron golem and a vindicator or any hostile mob
4.Observe the attack range from bedrock to java
5.Any sort of mob who is alone fighting an iron golem cannot fight back because the iron golem can reach it up to 3-4 block away from the reach of iron golem
Attachments
Comments 3

In the attached video, the vindicator is only 2 blocks from the iron golem when the iron golem hits it.
I also tested and cannot reproduce.