Your problem is because you are not using a monospaced font, that means the large of some letters are bigger than others, normally M is the most bigger on this type of fonts and that causes your text to move.
I doubt there is a pure CSS solution for this, at least that looks good because most of the letters will have a different proportion so you need to calculate the width and resize them looking on the letters you have.
Found a possible JS solution: Force Non-Monospace Font into Fixed Width Using CSS
Information to underestand your problem:
From Wikipedia Monospaced font source:
A monospaced font, also called a fixed-pitch, fixed-width, or
non-proportional font, is a font whose letters and characters each
occupy the same amount of horizontal space. This contrasts with
variable-width fonts, where the letters and spacings have different
widths. For example, the two high-use letters "I" and "E" do not need
the same footprint. Both letters differ in center-to-next-letter edge
(and center-to-center) spacing distance needs (margins) in variable
width fonts. The variable that changes is offset from what would
otherwise be monospaced centering. In a modern proportional font,
every dimension can be scaled and changed, but such sizing
mathematically must still maintain monospacing or variable spacing.
Examples:
No monospaced font:
div {
font-size: 142px;
font-family: Arial, Helvetica, sans-serif;
border-left: 2px solid red;
}
<div>AAA</div>
<div>MMM</div>
Monospaced font:
div {
font-size: 142px;
font-family: "Courier New", Courier, monospace;
border-left: 2px solid red;
}
<div>AAA</div>
<div>MMM</div>