If I add a grave (using \grave{}) or a tilde (using \widetilde{}) above a variable, the position of the exponent stays the same as if the grave or tilde were not being used. However, if I use both at once, the exponent changes positions.
Here is a minimum working example showing the issue.
\documentclass[a4paper]{article}
\usepackage{amsmath}
\begin{document}
\begin{equation}
\mathbf{B}^{T} \mathbf{A}^{-1} \mathbf{B}
\end{equation}
\begin{equation}
\mathbf{B}^{T} \widetilde{\mathbf{A}}^{-1} \mathbf{B}
\end{equation}
\begin{equation}
\mathbf{B}^{T} \grave{\mathbf{A}}^{-1} \mathbf{B}
\end{equation}
\begin{equation}
\mathbf{B}^{T} \grave{\widetilde{\mathbf{A}}}^{-1} \mathbf{B}
\end{equation}
\end{document}
How can I use both without changing the position of the exponent?