To answer the OP, yes, the CR system in 5e is garbage. And not just for the example you've given.

CR is calculated solely across 3 dimensions: HP (adjusted by AC), Damage (adjusted by attack bonus/spell DC), and abilities (which affect one of those two things).

Other spells and abilities that don't do damage never factor into the monster's CR.

Take the Githzerai Monk as a great example. It's like CR 8 and has Planeshift. A 7th level spell that it can use to banish one of your players for conceivably the rest of the campaign at that level.

It doesn't factor into its CR at all.

I don't know how anybody is defending the CR system it's absolute crap.