fweirds
This shouldnt be happening in vanilla Minecraft. The Villager loses his job almost immediately, usually 0.05 seconds (1-2 ticks) after lectern is broken. AutoLibrarian should work slower than this.
I can only assume you have edge cases like server being too slow.
Are you sure there isnt a second lectern placed somewhere which the villager is attached to?
Ive tested with tick rate 5 (which makes the game run 4 times slower, wurst working at almost the same speed), and it works perfectly.