Im pretty sure villagers have to be "willing" to breed, being in "mating mode" isn't enough anymore. Additionally, villagers must be "willing" in order to breed. After mating, they will no longer be willing. Villagers can become willing by the player trading with them.
Or it could be @StarBunnie's solution
Source: https://gaming.stackexchange.com/questions/188494/why-wont-my-villagers-breed