one note here, this bug seems to happen (most of the time) when players leave your render distance and come back or stop looking at a player since minecraft has a feature that makes entities un-render if they're too far away or/not in the players view, and also, minecraft un-renders player's skins too (they temporarily swith to the default skin (steve) to also help save on memory) and I think that this feature broke in some way when 1.17.0 released.
also, what's meant to happen is,
player's skins un-render (switch to steve) when not in someone else's render distance, and re-render (switch back to whatever skin they where using) when they re-enter someone else's render distance/are within the player's distance
what's happening instead is,
players skin's never re-render (switch back to their worn skin) after being within someone's render distance.
... that's all... hope this helps, maybe this might be the cause...?
this has happened to me pre 1.17. I had a nice cave with some villagers inside that I was breeding and when we stopped playing and logged off I noticed that, like have of the villagers where missing when we logged back on the next day... pretty stressful bug honestly, I'm lucky, If I hadn't bread those villagers I wouldn't have had pretty much any left at all
yeah I remember when I finished a skeleton farm in my world and after a while I thought it stopped working but it was this bug that was preventing the skeletons from dying. (although when more skeletons fell down the others got pushed and took damage) I switched my farm from using magma blocks to using a trident killer because of this (and because trident killers kill much faster)
thanks for letting me know on all my reports