We look inside the go.mod file and reject a module if the path that led us to it does not match the path in the go.mod file. So if you look for a module or package using different capitalization, and all versions of that path had a go.mod file, then we should say that we can't find it. (Should we instead redirect to the proper case? That's an open question.)
If a package predates modules, then we have the situation with Shopify/sarama. Without a go.mod file we can't tell which is the "true" import path of the module, indeed that's not really well-defined in the pre-module world. So we will show the package with whatever case we see it (whatever the module proxy and its index give us).
The go.mod file for this module says "Shopify", which is why that spelling gives you the latest version. But up to version 1.20.1, there was no go.mod file, so we still display the "shopify" spelling.
Should we drop the old versions? It's unclear; someone could be using them, and may want docs at that version under the spelling they're familiar with. At some point that benefit outweighs the confusion. As modules dominate the Go ecosystem, the old non-module versions will become irrelevant, and we can drop them. v1.20.1 of Shopify/sarama is over three years old, so I would be comfortable dropping it, but if there were newer non-module versions of package I might feel differently.