I ran into this when doing a bathroom remodel not too long ago. It turns out that the new-style vanities "on legs" are indeed taller than the old-style cabinets.
I did two things: first, I cut off a bit of the leg bottoms, then I did relocate some of the plumbing too. My daughter didn't like how tall the new style one was anyway, so I lowered it the best I could without destroying the look, and did the rest with plumbing. I did NOT have cast iron in the walls, just PVC. Home was built in 1996.
I also had a similar issue with a neighbors vanity. In that case we needed a very specific height to accommodate heat ducts under the vanity. Since the floor wasn't finished there, I fabricated a kick-panel system to cover up the legs, hide the floor and pretend that the vanity was not one "on legs" but a more conventional cabinet style that merely sat on the floor.
So, you have some carpentry ahead of you, some plumbing, or returning the vanity for one that fits better.