Multiple Transformations
If a creature is transformed, they cannot be transformed again until the first change wears off. If the transformation is permanant, they are immune to any further transformations. I had an adventurer with a custom interaction that allowed him to turn other people into wolves. After I retired him in a town, I tried to kill him with a different adventurer, but he just transformed me and chopped me to bits when I got close. However, using a different adventuruer, I used a interaction to permanantly transform myself into a werewolf-like creature (Yes, I like wolves. So what? ), and when he tried to transform me, I got the message "<name> gestures! You fall on down on all fours!", but nothing about turning into a wolf.
That contradicts an issue i had with gender-swap potion i made in fortress mode. It was meant to instantly, and permanently, turn male dwarves into female and vice-versa (using caste affected and immune caste, and twin syndromes on the same drink). But what happened was that each dwarf who drank it rapidly cycled male-female-male-female and i got my alerts spammed with 100's of transformations per drink.
So that shows that permanently changed dwarves can have their "new' caste targeted to change into something else.
So there must have been something else at work in your game. My newly "female" dwarves we able to be targeted by a syndrome which only affects females (and turns them into males).
Any further intel on when a creature is considered a PET and when a working member of society ?
I had dwarves transformed into other creatures, always resulting in TAME PETS
I had dwarves transformed into other dwarf castes, resulting in perfectly normal Dwarves
I had PETS transformed into dwarfs, resulting in TAME dwarves, that otherwise work as usual (skills, labors, equipment) They do have no name though.
That also used to happen if you add [PET][COMMON_DOMESTIC] to a dwarf caste, or all dwarves, during worldgen. You can them buy "tame" dwarves at embark, with the normal labors allowed.
If you leave [PET] on dwarves they're all treated like animals (or only the castes you apply it too). it's possible to make an edible dwarf sub-race by adding [PET] and removing [INTELLIGENT]. they can be butchered and tanned by the other dwarves no problem then, since they're seen as edible creatures, even though they can technically marry or breed with the other dwarves.
Also, with [PET] and [TRAINABLE] or [HUNTING] you can train hunting or wardwarves. (with the normal "animal" limitations on squads / equipment). It remains to be seen what training a dwarf as a transformed wardog does once they return to "dwarf" form.
Basically, [PET], [INTELLIGENT] and being of the main entity species are the three factors taken into account for whether dwarves can have labors, i managed to mod in [INTELLIGENT] and remove [PET] for an orangutan once, I could assign labors fine, but he never actually started a job!! So you can actually get a labor screen for an animal with a bit of modding of the race, but doesn't show up in Dwarf Therapist. That was in 31.18 though, things might have changed ( a while ago, i think those were the only tags i needed)