UPOS escape sequences are implemented by the device-specific service object according to the capabilities of the hardware.
It may be that your hardware doesn't support mixing alignment on a single line.
Possible solutions might be:
Overprinting the line, e.g. by performing a reverse line feed. Though this might be slow.
If you're using a fixed width font, generate a string in your application with the text aligned appropriately, rather than using escape sequences.