Witches that spawn in witch huts don't have PersistenceRequired set to 1
When witches spawn in their huts, their PersistenceRequired tag isn't set to 1 so they will most likely despawn before you get there. This may be a duplicate but this is the reason why they sometimes aren't there.
Zombie Villagers in Zombie Villages and the Illagers in the Woodland Mansions have the PersistenceRequired Tag set to 1 so Witches need it too.