i know! villagers have an underground tunnel system to escape from you
jokes aside, it's probably because every time you come out of a house/shop, their position may reset. Meaning, if you checked the museum (they were in a house) then you check re-tail and come out, they might spawn in the museum. There are more houses/shops than villagers and there could be more than one villager in a house/shop so it's an insane game of hide-and-seek!
it's really annoying when you are trying to find the villager of a lost item!
jokes aside, it's probably because every time you come out of a house/shop, their position may reset. Meaning, if you checked the museum (they were in a house) then you check re-tail and come out, they might spawn in the museum. There are more houses/shops than villagers and there could be more than one villager in a house/shop so it's an insane game of hide-and-seek!
it's really annoying when you are trying to find the villager of a lost item!