After having farmed a crop, villagers don't directly replant it. This used to be the case prior to 1.14's villager changes.
- Build a wheat field and let that field grow completely
- Place a composter
- Spawn a villager
- The villager will start farming
- It will not replant harvested wheat immediately