Steps to reproduce
Open
Summon a villager on the dirt path.
Expected results
The villager avoids the magma and stays on the path blocks.
Observed results
When rounding the corners at the end of the path rows, the villager often moves across the magma and takes damage. Eventually it dies.
Villagers and pillagers seem to be much better at this in 1.20 than I remember, but pigs are not.