In this example, the horizontal tags were not grouped prior to creating the Stack. To prevent undesired behaviour, Adobe XD automatically groups horizontal objects in a vertical stack so that you don’t have to worry about grouping them.
This also makes creating a horizontal stack for the tags a one click action. With the newly created tag group selected, enable the Stack. This time you’ll notice it automatically assigns a horizontal stack, allowing the tags to be quickly shuffled in order, as desired.