Mail.app message selection gets reset when clearing the search box
Answering (sort of) my own question.  When making the screenshots I added to the question, I happened to turn off the "Organize by Conversation" option, and it suddenly worked!  When clearing the search box, the selected message remains selected.

Moreover, this also happens:


Turn on "Organize by Conversation"
Enter some search term
Select a message
Clear the search box -- the message will be deselected
Turn off "Organize by Conversation"
The previously selected message is reselected


So I guess the "answer" is that "Organize by Conversation" is simply a shoddy feature that Apple bolted onto their mail client without caring too much how well it works.