I have a small village with several job blocks that I locked into valuable trades, and several times now I have had a villager completely lose his locked trades or his block without it being removed.
Mason
I had a single Mason in my village, but one evening went in and found two masons. Using a data pack, I attempted to locate each villagers' workstation to discover the original Mason had no job block, but the new Mason had claimed it. This was not a villager who grew up, but one who spontaneously appeared, fully grown, overnight in-game.
Scholar
I had three scholars in the same village with valuable trades. When a new villager grew up, I gave him a lectern and rerolled him until I got a trade I wanted. Once I'd traded with him, I went back to one of the previously locked with villagers to trade. I had confirmed his trade (Fortune III) before I started rolling the new villager. When I clicked him this time, he was reset back to apprentice and had Smite II instead.
I've also lost a farmer and two other scholars to this. I'm not sure what is wrong, and I've even gone so far as to isolate the villagers I'm not rerolling so there are no mistakes, but the villagers just keep losing their trades.
Is this still an issue in version 1.18.1? If so, please attach screenshots or video of the issue with the debug screen (F3) enabled.