As these are just the results that we get from our upstream indexes, there isn't a quick fix that we can do on Kagi's end that is both reliable & will scale to other documentation sources; this is a broader issue with other docs sites, and other search engines. But, if you have any ideas, we'd of course love to hear them.
We will be launching rewrite rules very soon that will allow this to be fixed at the user-level:
https://kagifeedback.org/d/158-rewrite-rules-for-domains-ability-to-eg-translate-redditcom-into-oldredditcom/31