In my village, my villagers are constantly becoming invisible, even wandering traders are invisible, only their llamas are there. That said, they always reappear after a few minutes. I thought that witches might be the reason so i did a test. I kept and surrounded a village with walls and lit up the place, yet some of the villagers are still becoming invisible. This issue is really annoying, because I can never find the villager I want to trade with.
Normal villagers are not supposed to be invisible. Try relogging to fix that problem. Wandering villagers, on the other hand, are supposed to be invisible when night falls. They drink an invis potion, but the Llamas stay visible.
If you are using modpacks or resourcepacks, check if they are up to date since they may either have bugs or intended to make villagers invisible.