In my current version (Studio EE 2017.1.6522), everytime you select a new Activity (any Activity) the sorting of the variables all revert back to its original order; which, I believe, is by when you created the variable.
The sorting should, in my opinion, stay in the same order until you decide to change it yourself.
And, I’m also assuming that this was not yet resolved in 2018 version, which I have not used.
What do you think all?
Regards and Thanks.