Sometimes the return to position simply does not work.
I also had “Mana Memory” and “The Rush of Sacrifice” skilled and the mana was not refunded.
This might be related to stairs/slope/terrain
Due to the overly strict mana requirements in the game this is quite a “unplayable” bug because it can quite easily rip the character