The bug
Zombies, when placed inside a chamber with a villager don't attack the villager frequently enough. They seem to pause for a lengthy moment and then attack once again.
Attachments
Comments 4
The summary and description here seem to be describing two separate bugs. The issue in the description is MC-147516, while the issue in the summary was fixed in 23w33a with the changes to mobs' melee ranges.
Please check if this is still an issue for you in 1.16 Release Candidate 1 or later.