I have only noticed since the 1.18.2 update but this could've happened from 1.18.1; I initially noticed that my minecarts disappeared in my auto smelter, the next day when going to trad I found that 90% of all my villagers despawned as well. This seems to be completely random/ possibly based on what chunk they're in as my auto-farms still work fine and I know nothing is wrong with my villager trading hall as it's been working well for over a year now (incidentally now lost my rare melon slice trades which you can't get anymore 😞 ).
Would love to see this addressed soon as I'm cautious with setting up trades in case this happens again.
Related issues
Comments

Thank you for your report!
We're tracking this issue in MCPE-144208, so this ticket is being resolved and linked as a duplicate.
If you would like to add a vote and any extra information to the main ticket it would be appreciated.
If you haven't already, you might like to make use of the search feature to see if the issue has already been mentioned.
Quick Links:
📓 Bug Tracker Guidelines – 💬 Community Support – 📧 Mojang Support
📓 Project Summary – ✍️ Feedback and Suggestions – 📖 Game Wiki
-- I am a bot. This action was performed automatically! The ticket was resolved by one of our moderators, and I left this message to give more information to you.