I've linked a video example (imgur, 37 seconds long) as I cannot inline it for some reason
Video: https://i.imgur.com/0lFkAxZ.mp4
Explanation:
I've made a text file with ascii art for ONE, TWO, and THREE so it's easier to see which desktop space we're "really" on. Above that in the bar you can see I, II, and III for the desktop space number from yabai. In the beginning all line up.
I give a program I know creates a popup the go-ahead and move to desktop THREE (via the default skhdc commands), and then get impatient and go to desktop TWO and it fires off the popup. I then press ok on the popup causing focus to go back to space ONE before going back to TWO which has been reordered to THREE.
Now the ascii art ONE is on I, TWO is on III, and THREE is on II.
I repeat this process again, waiting on the desktop I want to become II, which means I am waiting on III as that's where TWO now resides. Once it comes up I press ok and it causes focus to go back to ONE and then back to TWO which has been re-ordered to II. Thus ending with ONE on I, TWO on II, and THREE on III.
This explanation here is probably redundant given the video but I wanted to be thorough. Is this a bug?
I can redo this less cropped if you'd like.

Looks like this setting for me. It's enabled by default, and only triggers when accessing spaces through means other than directly switching to a specific space.
That was exactly it!
Disabled, repeated, passed. Thank you again. Hope me creating issues like these isn't a problem.
Hope me creating issues like these isn't a problem.
No worries. :-)
Most helpful comment
Looks like this setting for me. It's enabled by default, and only triggers when accessing spaces through means other than directly switching to a specific space.