Still an issue on Bedrock on Switch. On a Normal difficulty realm that a player doesn't admin, this means that you have to breed villagers, get their trades lined up, and then only 1 in 32 villagers (50% cure rate gamble ^ 5) would actually make it through to get full discounts.
While this wouldn't fix the odds, at least I wouldn't have to find the right trades over and over only to watch them die.
A few gathered reports, myself included, that should be on this thread from MCPE-21416, lots of them from the Switch on 1.17.40:
https://bugs.mojang.com/browse/MCPE-21416?focusedCommentId=1095307&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-1095307
https://bugs.mojang.com/browse/MCPE-21416?focusedCommentId=1095827&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-1095827
https://bugs.mojang.com/browse/MCPE-21416?focusedCommentId=1095880&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-1095880
https://bugs.mojang.com/browse/MCPE-21416?focusedCommentId=1096794&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-1096794
https://bugs.mojang.com/browse/MCPE-21416?focusedCommentId=1097004&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-1097004
On the Switch, using a physical game cartridge, on a world that started around 1.17.10, and was updated to 1.17.40. Single and Multiplayer (couch co-op split screen, not network). This was not our first session on 1.17.40, and we didn't have any issue with mob depsawning in other sessions.
Yesterday, we opened the world to find all normally stable mobs despawned in our shared base. Tamed wolves (named and unnamed), cat, sheep, cows, pigs, chicken, salmon, unnattached trader llamas, named zombie, villagers, and minecarts. Interestingly, the one bee we have was inside its hive when we loaded the world, and it persisted. One strange thing I noticed was that a cat spawned near where the villagers were located before they despawned.
In the session prior to the despawning, three of us went adventuring. We had all double checked our respawn points were set in our houses in the shared base. We disabled a Haste 2 beacon by removing a block from the 3x3 layer. We flew away with via elytras, and went roughly 1000 blocks from the base for 30 minutes doing some fighting and mining. We then flew back, and I believe all the mobs were still spawned correctly at the time of our return (I'm not 100% certain). We did a Save and Quit. I think one of the players who wasn't the "main" on the world did Save and Quit individually, and then the main player did a save and quit (which automatically exited the other remaining player). It's not uncommon for us to have the main player Save and Quit with other players still active, which closes all the other sessions, and has never been a problem in the past that I've seen.
We've been on similar adventures before, but this is our first one on 1.17.40 where we traveled any notable distance.
None of the mentioned solutions work if you're the second player on a local multiplayer. Everything just spins forever. Even the text says things like localization.gotomarketplace rather than actual words.