Logging back into a Realms server (and maybe other servers) in a dimension with a leashed tamed cat (i.e. tied to a fence post with a lead) causes the cat to teleport to the player and break the lead. Cats tied to fence posts are not expected to teleport to the player under any circumstances
Thanks for the report! This is the same issue as MC-236289, so it will be resolved as a duplicate. In the future, if you'd like to confirm that an issue persists in the latest version, all you need to do is add a comment to the report like "Can confirm in 1.18.1", and we'll add the version. 🙂