Neutral mobs can attack players in creative mode if their NBT is updated every tick
1. Enter the following command into a powered, repeating command block.
execute as @e[type=minecraft:iron_golem] run data merge entity @s {PersistenceRequired:1b,Attributes:[{Name:generic.follow_range,Base:100}]}
2. Switch to survival mode and attack the Neutral mob
3. Change to Creative mode
relates to MC-146524, MC-153697, MC-165448