Well, the custom script is something that I dont know why it is needed
Anyway, when you transform your unit, your unit gets some kind of refreshed using a new object id.
That said, it will lose ALL abilities added via triggers unless they are made permanent.
So you have to call a function that makes the ability permanent after he gained it.
Because there is no GUI action to do it, you have to use a custom script.
But I dont really know why all abilities are removed... Kind of Blizzard logic.
Anyway, to your other question, when you activate the transform ability (Bear Form, Wolf Form) this trigger runs.
It will check if the unit has the ability Critical Strike (which it has from the start of the game).
If so, the caster transformed into a werewolf.
So you add vampiric aura, set its level and remove critical strike.
Because the unit is still transforming, and the abilities will be removed, you have to make it permanent as well. (Making abilities permanent should therefor be done in every single case, no matter what.)
In your trigger, it runs the first one, checks if he has critical strike, adds vampiric aura and removes critical strike, but then also runs the other trigger so the vampiric aura is immediately removed and critical strike is added.
Thats why yours didnt work.
Try to place things in the same trigger as much as possible.
If/Then/Else functions are often more usefull than multiple triggers.