I found that this is due to the wolf trying to teleport to the owner's coordinates in the wrong dimension.
For example, Player 1 and Player 2 are in the overworld, going to the nether. Player 1 owns a wolf and pushes the wolf into a nether portal without making it sit (so it is free to move around in the nether, though it is currently frozen in an unloaded nether chunk since no players are in the nether). Then, Player 2 goes into the nether while Player 1 stays behind. As soon as Player 2 loads the nether, Player 1's wolf is able to move and realizes that it's far away from its owner and needs to teleport, so it teleports near Player 1's coordinates in the nether. The problem here is Player 1 is still in the overworld, so the wolf not only teleports to the wrong location, but it's now in yet another unloaded (possibly ungenerated) nether chunk.
I've had this happen to me with several wolves and I've found it also happens in the End. I've found wolves stuck inside walls and nearly falling into the void because they attempted to teleport to overworld coordinates in the nether/end.
I can also confirm that this is happening in my worlds too. Though, in my case it occurs when I download a copy of my realm. Once I try to play the downloaded copy of the realm, my inventory is reset and I appear at the world spawn point. I also cannot interact with my pets. The odd thing is that re-uploading the realm doesn't fix the issue, but it does do something else. After uploading the realm again, I stay in the same place I was in while the world was downloaded and keep my offline inventory, but I don't regain the ability to interact with my pets.
It's like downloading the realm doesn't save the owner's data to the host on the downloaded copy, and so the owner's inventory/location/owner status gets reset. Then, when the realm is re-uploaded, the offline host session replaces the owner's data on the realm.
This only affects me as the owner of the realm. No other players on my realm have been affected by this. I do have the EX toggle enabled on the world from back when tridents first got added behind the toggle.
In an interesting side note, this also causes lost parrots to be able to perch on the player's shoulder, but the parrot will not dismount for any reason except that the player dies/sleeps or something similar. They will stay on the player's shoulder if they fall down a large distance.
EDIT: I use Minecraft for Windows 10 and Android. This has happened on both versions.
Also affects v1.18.12