With a new hammer the position of the sear, in relation to the safety usually changes. The sear will not rotate as far (clockwise if looking at it from the left side of the frame) as it does with the factory hammers with deeper full cock notches. That can result in the can on the left side safety shaft not freely (or at all) rotating (clockwise again) as you put it on safe. That cam has to move under the forward arm of the sear to lock the sear so that it can't move and release the hammer.
First time I changed a hammer getting that safety cam modified "just right" was bear as you have to remove it from the frame, remove some small amount of metal, reinstall and try and then repeat if it doesn't work.
After that, I just ordered a CGW adjustable sear every time I replaced a hammer on the CZ75 series pistols.
Did you put the parts in or have it done at a shop? Either way, taking the time to get that cam modified correctly (or installing a CGW adjustable sear) would have saved you some wonder/worry.
Green arrow points to the forward arm of the sear that the cam on the safety shaft rotates under to keep it from moving (firing). Red arrow points to the cam on the safety shaft. Some people remove metal from the cam, others from the sear. Or buy the CGW adjustable sear.

There's also a spring/detent in the frame on the left side that locks the safety into the frame but usually, the complaint on those is that they are too loose/easy and allow movement of the safety without enough effort to satisfy people. That usually doesn't get changed with installing "upgraded" parts or doing smoothing/trigger work so it probably has nothing to do with your issue.