Define the variables $$\eqalign{ L &= \log(D),\quad \beta = -3\alpha \cr }$$ One nice thing about diagonal matrices is that they can be manipulated almost like scalars. Consider the following diagonal matrix function and its differential. $$\eqalign{ F &= D^\beta = \exp(\beta L) \cr dF &= FL\,d\beta = -3FL\,d\alpha \cr }$$ Write the trace function in terms of the Frobenius (:) product and the $F$-function.
Then find its differential and gradient. $$\eqalign{ \phi &= {\rm Tr}(BAF) = BA:F \cr d\phi &= BA:dF = -3BA:FL\,d\alpha \cr \frac{d\phi}{d\alpha} &= -3BA:FL \cr }$$ **NB:** You stated that the $D$-matrix was non-negative, but that's not good enough. For the logarithm (or negative powers) to make sense, there can be no zeros on its diagonal.