I have this problem too. I’ve been slowly losing villagers from my trading hall (apartment), even though most are name-tagged. Someone on Reddit mentioned they read that chunk borders may be a culprit too. Have you done a test that involved the bells? I thought 0ldguy said that bells have nothing to do with villager mechanics, at least for iron farms.
Gosh I thought I was going nuts... ok I’m not the only one with this issue. I think each time I’ve lost a shulker or enderchest, it was positioned right on a chunk border. Mojang, y’all gotta make those chunk borders a little less volatile.