moderated Closing applications and the keyboard focus


I'm trying to understand some of the principles of the keyboard focus.  Let’s suppose I have six application windows open. I have three Chrome windows open, two Word document windows open, and one File Explorer window open. Let's also assume the keyboard focus is in File Explore on a split button.

If I close File Explorer with alt + f4, then Windows moves the keyboard focus to one of the other application windows. But how does Windows  decide which of the remaining five application windows to choose? I would like to know if there’s some kind of pattern or principle.

Join to automatically receive all group messages.