Just discovered exactly this issue today on my world that I use with my daughter. We had a probelm with a whole load of villagers just disappearing when the game crashed back in 1.14, so since then when I have traded and set up a villager with a profession, I have name tagged them in the hope that that will stop them disappearing randomly. Today I found that of our villagers that had professions, etc, almost all of them that were named no longer have names and, whether they were named yet or not, most have either reset back to Novice level (several we had traded with up to their highest level) or have lost their professions completely. I had four stonemasons, all fully traded up to Master and I now only have one and he's back to level 1! At least 9 or 10 have lost their names/name tags, umpteen are all without professions now, and of the rest, only two as far as I can tell are still at the Master level that they were before - all the others are back down to Novice level.
Nothing has changed in the village - no work stations moved or anything - and when this happened exactly I have no idea - we've been working on other projects and the only one I've traded with recently is one of the few that's not reset itself. It's so frustrating if only because it takes a while to trade enough to get them up the levels, there's no guarantee I'll get them to accept their old professions again, and nametags are not cheap! It's especially frustrating given I went through all the naming and so on precisely because we lost half the villagers before - I thought I was safe enough by doing what I'd been doing. Apparently not. We play on PCs, Bedrock edition, version 16.2
I am close to giving up trading with villagers to get them to master level, I have had several simply disappear or change professions. Today, two farmers, one of them named, both master level, and one of them (the named one) has been in the world for quite some time. They are the only two I have in my 'farm' (enclosed so they can't escape and I play on peaceful, so no mobs to attack them) that trade melon slices. I wondered why the moment I entered the farm I found a new villager without a profession and a baby villager.
The first time this happened was some time after the Nether update - we found half of our villagers had simply disappeared, changed professions or were back to novice level. It now just randomly happens from time to time - that famer we had no longer exists, the four stonemasons are now two but we have a random extra shepherd... We are no longer surprised each time it happens, just irritated. The point of trading is to lock them in to their professions, and the point of naming them is so they don't despawn. I've pretty much given up on trading for the time being till this is sorted. It's just frustrating.