At any moment you can sort variables of a group according to their name, type or dimension. For that you simply need to:
1- move the cursor to the header of the group
2- click on the name of the wished column
The workbench always keeps the original order of declared variables, in order to allow safe On Line change. Each time you insert a new variable or expand/collapse a group, the original sorting is re-applied.