EDIT: I only play on single player, never on realms or with other people. This issue has occurred on peaceful difficulty in a completely enclosed (underground) room, and I always changed the weather during a thunderstorm. I am aware that sometimes mobs will disappear on chunk borders, but I have had entire villages disappear at once. It has only happened to me after the Village and Pillage update so that may have introduced a bug along with all the new features that came with villagers.
EDIT: I only play on single player, never on realms or with other people. This issue has occurred on peaceful difficulty in a completely enclosed (underground) room, and I always changed the weather during a thunderstorm. I am aware that sometimes mobs will disappear on chunk borders, but I have had entire villages disappear at once. It has only happened to me after the Village and Pillage update so that may have introduced a bug along with all the new features that came with villagers.