However I’m not sure if stay visible would be useful to a text-transformation extension like this. It was intended for the “Bold Italic Underline” extension where people could apply or remove each style with subsequent clicks.
It won’t do that, I’m afraid. Each invocation with “stay visible” is identical, using the same “frozen” input. It doesn’t refresh the actions with new input; it just prevents the pop-up from disappearing.
What you want to do isn’t currently possible, but there is a discussion about this under Action Chaining, and it is still a strong possibility for a future feature.