С точки зрения стандарта языка:
The comparison operators == and != must be fully defined for operands of the key type; thus the key type must not be a function, map, or slice. If the key type is an interface (то есть any) type, these comparison operators must be defined for the dynamic key values; failure will cause a run-time panic.
В текущем случае тип Key это произведение типов int и func. Поскольку в произведении типов присутствует тип func, то
Key не имеет операторов сравнения != и ==. Поэтому, согласно стандарту, получаем панику:panic: runtime error: hash of unhashable type main.Key
https://go.dev/play/p/YgAgjKr6Jhp