In a private realm in 1.17.40, I was playing alone in the Overworld (never gone to Nether). I had attached some horses and donkeys on fences. The disappearance occured two times on the same realm :
one time there was two donkeys attached on the same fence and three horses attached together on another nearby. I just climbed 50 in height to mine some blocks, and when I came down there was one donkey and one horse gone. Nowhere to be found, and without the leads or the saddles on the ground. I was playing in peaceful and there was no lava either.
the other time, I attached 5 horses and 2 donkeys individually, I was just gone 100 blocks away (no change in altitude) and came back soon after, and one donkey has disappeared again. This time because it was attached individually, I could see the knot of the lead still attached on the fence but no lead line in sight, just the knot. I tried to quit then reconnect, but it was the same. I detached the knot, and no lead dropping on the ground, and of course, still no donkey.
Related issues
Comments

Thank you and sorry, I searched already but didn't find it
Thank you for your report!
We're tracking this issue in MCPE-21416, 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