You're not attacking her with magic, you're attacking her with a supernaturally-empowered weapon that can hurt her. Pure magic attacks, though, she can just walk through. It takes a huge amount of magic to bypass her Magic Resistance, something like some of the attacks of certain Noble Phantasms. She can walk through Caster's spells, but physical Noble Phantasms like Gae Bolg or any number of Gil's can hurt her just fine.