I like the idea.
Not sure we need another dropdown menu in the “by attribute” view. Or I don’t quite understand how you imagine it.
See last paragraph of [GSoC 2024] Improving the Tracker Query Window - #17 by humdinger . The added “Other” menu item at the bottom of the attributes list would contain all attributes in the system. All indexed attributes that is, because only these can be searched by query. While limiting, it should simplify listing all possible attributes.