The container probably resizes using its anchor which, by default, is in the upper left corner. This can be adjusted by ctrl+shift+click here:
And then offset as needed.
Another solution is to wrap the text with a translucent border, should also work OK.
Good luck!