Don't guns with hammers like that usually have a de-cocking mechanism too. So you don't have to dry fire it to de-cock it.
Im not a certified armorer (perhaps we get the girl from the Rust movie!) but yes, in my experience, all firearms that have a cocking mechanism have a decocking mechanism. All of mine do, but I am sure there are exceptions.
There are some I have seen where you pull the hammer back further, and then a trigger pull will allow you to lower the hammer all the way down and it is decocked at that point.