Resizing of external labels

I would like to resize external labels, however enabling resizing does not work quite well for external labels.

The problem is, that the frame is not keeping the size after resizing.

image
image
image
image
image

Code:
I have added a module using the rule provider with the code like this:

this.addRule(‘shape.resize’, function(context) {
return true; // allow resize temporarly. (TODO: Filter external labels)
}

How can I ensure the frame size is kept after resizing?