Minecraft 1.14 Pre-Release 1, Minecraft 1.14 Pre-Release 2, Minecraft 1.14 Pre-Release 3, Minecraft 1.14 Pre-Release 4, Minecraft 1.14 Pre-Release 5, Minecraft 1.14, Minecraft 1.14.2, 20w14a, 1.16.1, 1.16.2 Release Candidate 1, 1.16.2 Release Candidate 2, 1.16.2, 1.16.3 Release Candidate 1, 1.16.3, 1.16.4 Release Candidate 1, 1.16.4, 20w49a, 20w51a, 1.18.2, 22w18a
Edit: with the recent tests I have been doing on Raids once again I can confirm this problem can be reproduced in the newest versions, fortunately I figured out what’s happening and it’s not only limited to Ravagers AI, in the comments someone also provides a very useful clip to confirm this.
To begin with the Raiders can sometimes spawn far away from the Village, they share a common goal and this one seems to be relative coords to the Center point of the Village and its boundaries that said at the very beginning they focus more on rush to this point before they remain with their hostile behavior, when a Raid forces these guys to spawn in a cave for example, here in the inside they try to reach at least the Village boundaries before they attack back the players.
A solution for this will be let the Raiders attack back if they get approached by the players while they’re trying to reach the Village limits, but even tho this seems like an obvious solution I suggest a more smart solution to compromise less the Raiders AI which btw it works fantastic outside of this problem.
First I think the spreading system for Raids should focus not only in x | z coordinates but make very strict exceptions when attempts to spawn the Raiders in low y coordinates in this case for Caves and the most annoying one Ravines (Most likely this seems to be the case to Ravines and Caves that has access to skylight since I have never seen a Raid wave spawning very deep below), so you fix 2 Issues at once you first prevent this behavior affects Raiders and it gets rid of the annoying search players have to do to find a Raid wave that spawned inside a Cave.
believe this issue happens when a Ravager can't pathfind to a Raid and their AI basically gets freezed, they stop moving, unless you push it, and it doesn't react or response to the player or other Mobs hits, naturally they won't approach the player as well.
At the beginning of a Raid Wave this guy spawned close to this cliff that seems like interrupted it's Pathfinding, after a while I found it but wasn't even trying to dodge this obstacle or try to keep up with the other Raiders.
There still some tweaks missing to the Ravagers AI/ Pathfinding, these guys seems like are currently the ones that present problems more frequentenly on Raids or any Enviroment