This happens for any passive/neutral mob for me in java and bedrock editions. It is most likely because passive/neutral mobs are attracted to light.
This happens for any passive/neutral mob for me in java and bedrock editions. It is most likely because passive/neutral mobs are attracted to light.