It's a problem with labels. You have two occurrences of phi with different labels, so Mathcad views them as different. It's equivalent to d/dA(f(B)), which is of course zero. Set the labels to both be "variable" and it works
In Mathcad Prime you have to be careful with labels!
It would have been better to continue the previous thread rather than starting a new one.