We discuss theoretically rather rear example of spin-flop transition which is accompanied with changing the type of magnetic ordering and which seemingly has not been addressed yet. We demonstrate that changing the type of magnetic ordering can manifest itself in antiferromagnetic (AF) resonance experiments as an apparent peculiar switching of the anisotropy at the transition from the easy-axis type to the easy-plane one. We argue that this kind of spin-flop transition is observed recently by K. Yu. Povarov et al., Phys. Rev. B 87, 214402 (2013) in Cu(pz)2(ClO4)2 (where pz denotes pyrazine), one of the best realizations of spin-Heisenberg AFs on square lattice having a very small anisotropy. We show that the magnetic ordering changes at the spin-flop transition in this material in the direction perpendicular to AF square planes. We examine the microscopic mechanism of such behavior in Cu(pz)2(ClO4)2 and find that dipolar forces and extremely small exchange coupling between spins from neighboring planes are responsible for it.