This happened to my village at least 3 times as well as 2 separate villages before . I discovered the first time it COULD HAVE been the zombies that got in because of some portions of my wall were not 2 blacks tall. BUT THEN and all but 2-3 villagers disappeared(because I could've sworn that I had a farmer but then they quickly disappeared to). I tried to quarantine the remaining villagers into one house but my 2 villagers decided to wonder before I could close off the house. Then I noticed that my librarian wasn't around. It was confirmed to have disappeared when I replaced his workstation and no particles appeared.
I put so much work to trying to protect and 'personalize' this village and it just doesn't seen possible with this bug.
This issue happened again. I used name tags on all my villagers but they still disappeared.