On both of those pistols, the rear sight holds down the firing pin safety parts, down in a hole in the slide. It can be tricky to reposition them while reinstallation.
Any sight installation with a dovetail can, may, and/or probably will require fitting to acheive optimum fit.