How to center accents over variables when making equations?

Hi, I’m trying to clean up a bunch of papers of mine and a lot of them are very derivation heavy. Because of this there are a lot of accents over variables (dots, bars, etc.), but whenever I make one with a subscript, the accent moves over the character as a whole and is no longer centered. This is really frustrating and I have no idea how to fix this. Below is a picture of what I’m talking about. Any help would be incredibly appreciated.

C:\fakepath\Screenshot from 2021-02-20 20-18-27.png

(inline display fixed by ajlittoz)

Use curly brackets {bar X}_{RAW} . When I want to group stuff invisibly, curly brackets are my go to. Cheers, Al

image description