To my knowledge, there's no solution that doesn't modify the content of the input. You probably don't want to modify the value
for reasons that I describe below, but if you do, you're opening up a Pandora's Box full of conditional statements, browser compatibility issues, and behaviors that frustrate your users.
The best solution to this would be to use CSS, as it wouldn't force you to modify the user's input value. However, CSS only allows you to modify the color of the caret, not its position.
This leaves JavaScript, which, unless you want to add and remove a space from the end of the input dynamically, doesn't give you many options, either. I'd recommend against the appending approach for a variety of reasons, most of which center around user-experience and accessibility.
If you do add a space dynamically, it's easily removed by hitting backspace. You shouldn't add the space back while the user is editing the field as this can cause all sorts of jitters, accessibility issues, and overwriting if done carelessly. Above all, if you add a space to the input, it will persist in the value of the field if the form containing it is submitted.
Ultimately, the look of input fields is only partially under your control as a web developer. This is done mainly to ensure that functionality on every page is as clear and obvious as possible while still allowing some visual customization. Although I think your use case here is pretty reasonable, you're bumping up against the limits of the platform.
One other thing to keep in mind is that if you're loading your page in an iFrame, your existing focus method won't work in modern browsers due to security settings designed to prevent password theft.