Here is a short example of what I found weird:
ex:= 2(r)**(-2) - B(r);
vary(_, $B(r) -> \delta{B}$);
from which I get
2 {r}^{-2} - \delta\left(B\left(r\right)\right)
I tought that it was due to my older version of cadabra, but I just installed the latest version and the answer is the same. If I had in the first term just r, without an exponent, the answer woud be correct.
Thanks,
Andrei