Wouldn’t the structure of the code be be more copyrightable than the names?

community makes mods, they don't duplicate game code structure, and if they do it's clearly by accident because the code is obfuscated

But the mod relies on the code structure as much as it relies on the names, I think it could still be considered a derivative work, I don’t think this would be copyrightable but I find the code structure being copyrightable more plausible than the names