You stated:
To add a hash method, you need to make them immutable by setting unsafe_hash to True
The logic doesn't seem to fit the naming, and from how I interpret the docs you might do it this way but it is frowned on:
Although not recommended, you can force dataclass() to create a hash() method with unsafe_hash=True. This might be the case if your class is logically immutable but can nonetheless be mutated. This is a specialized use case and should be considered carefully.
It might be better to look at the settings of the eq and frozen parameters when unsafe_hash=False, (the default): Setting eq=True, frozen=True would then get a hash method generated.
Gosh, it takes my concentration to work this out :-)