This might be a good case for using the Any (generic) blocks, and a global list of your button components both_buttons (Button1, Button2).
Init a second global list of buttons, shuffled_buttons, copied from both_buttons then shuffled randomly.
Use item 1 from list shuffled_buttons as you would have used Button1, and
use item 2 from list shuffled_buttons as you would have used Button2.
Shuffle procedure(s) can be found in