I have a similar issue with villagers. The villager won't lose/change profession once I've traded with it. It can however change profession when I have not traded with it. I think this issue occurred since version 1.18
How you can try and replicate it:
place a job block to give villager profession
trade with villager
then destroy job block again
The villager should lose it's job, however it stays in it's last profession and won't change it.
I have a similar issue with villagers. The villager won't lose/change profession once I've traded with it. It can however change profession when I have not traded with it.
I think this issue occurred since version 1.18
How you can try and replicate it:
place a job block to give villager profession
trade with villager
then destroy job block again
The villager should lose it's job, however it stays in it's last profession and won't change it.