Farmer Villagers will plant or harvest 3 or 4 crops then stop, and get stuck nodding their head as though looking for a new block then getting stuck.
Logging out then in will lead to them planting/harvesting 3 or 4 more crops, then stopping again.
This has been tested in survival and creative.
Initially I thought it might be because the farm blocks were over a minecart track, but this issues remains if the blocks below the farm grounds are solid.
I have attached the creative world showing the bug
Thank you for helping us improve Minecraft! We saved your files: