Hi,
Maybe your text box is left aligned? If your text box is centered then it should appear always correctly if there is 1 digit or 2 digits.
Another possible solution you could use, since I don't know the specifics of your project, is to clone your sprite and have one sprite for digits 1 to 9 and a cloned sprite for digits 10 to 99.
And yet another possible solution is to, instead of spawning the text on the sprite, is to spawn the sprite behind the text which is correctly positioned.
Good luck