Ive noticed this bug has been around since 2020.
It has not yet been resolved.
Dogs and cats do not follow you home. Sometimes they arrive after a week, or if your boating along a few later, i find them stranded places.
They do not teleport.
Hope you fix this soon, as its frustrating to try to bring home cats from really far away, and dogs get lost when you travel.
MCPE-47340 Cat / dog / parrot disappear when travelling over water