Expected Results:
Villagers should sprint away from creatures that are hostile toward them when they get near them. They should run away from Zombies and all Illagers (including Ravagers).
Actual Results:
Villagers do not sprint away from Ravagers unless they get hit by them. Even then, the "is_avoiding_mobs{}" query will read 0 in this scenario.
Attachments
Comments 7

The game has had this bug for a long time; probably since 1.17 or so. I remember finding it a long time ago, but I assumed someone else would have noticed it and would hopefully report it.
Thank you for your report!
We're tracking this issue in MCPE-51268, so this ticket is being resolved and linked as a duplicate.
If you would like to add a vote and any extra information to the main ticket it would be appreciated.
If you haven't already, you might like to make use of the search feature to see if the issue has already been mentioned.
Quick Links:
📓 Bug Tracker Guidelines – 💬 Community Support – 📧 Mojang Support
📓 Project Summary – ✍️ Feedback and Suggestions – 📖 Game Wiki
-- I am a bot. This action was performed automatically! The ticket was resolved by one of our moderators, and I left this message to give more information to you.
This is not a duplicate of MCPE-51268. This is a different bug.
MCPE-51268 describes clearly villager running towards the entity who hit them.
MCPE-175018 is a bug where villager specifically do not run away from ravagers when they are near them. They are currently not triggering the is_avoiding_mob behavior
[[MCQA] Bartłomiej Słodkowski|https://bugs.mojang.com/secure/ViewProfile.jspa?name=baslod] Please read both bug descriptions carefully. They are both two different issues; this is not a duplicate.