If a pillager with a crossbow is touching a cactus but is still able to shoot the player they won't move to save themselves. This isn't a problem with skeletons and strays.
I wasn't able to upload my screenshots I got the message Jira was unable to load because there was a missing token but just to let you know the list includes fire, magma blocks, cactus, campfires, suffocation, and lava
Attachments
Comments 8
To reproduce this with cactuses you need to knock them into the cactuses either by yourself, or by getting them to shoot themselves. They don't pathfind into them, but once they're in the cactus they don't move as long as they can shoot you.
Can confirm for 20w51a (tested with villagers).