Villager just won’t change profession

So I’m trying to get some mending books and I already have a cured villager sitting in a boat so I can keep resetting his inventory. After switching the stock a few times he has gotten “stuck”.

This has happened before with previous villagers and they eventually lose their stock but I’m wondering why this might happen.

If anyone found a fix please help me.