Analytic gradient and derivative coupling vectors for CASPT2 and its RASPT2 counterparts with IPEA shift were derived and implemented in the open-source package Open-Molcas. IPEA shift introduces an additional source of non-invariance: non-invariance with respect to rotations among non-orthogonal ICB and active MOs. Two additional constraints were introduced to formulate analytic derivatives: orthogonality of the independent and dependent vectors of the orthogonal transformation matrix and of the active MOs (the fourth and fifth terms in Eq. (38), respectively). Both constraint conditions are necessary for fully analytic derivatives. In spite of the additional non-invariance, PESs described with XMS-CASPT2-IPEA are generally smooth, but there is a greater chance of irregularities occurring compared with XMS-CASPT2 without IPEA shift. PESs described with RMS-CASPT2 can have a few discontinuities, but these are introduced by the use of the RMS approach and are not severe when locating minimum energy and MECI structures.