Why does stepper motor not turn properly at different frequencies?
"On motor 3.15V and 4.2A is written."

This means that each coil has a resistance of 3.15 / 4.2 , or about 0.75 ohms.

You do not describe your driver in detail. Is it a constant-current type? If so, what current have you set it to? Note that I doubt that it is a constant-current unit. If not, what is the maximum current each phase can handle?

I suspect that, at 24 volts you are wildly overdriving your motor (the power supply current limited and you got 7 amps through each energized coil), and I'm a little surprised it still works. Plus, I'm also surprised that your driver has not been damaged.

Given what you did to it at 24 volts, and since at low speeds it seems to work properly, I'd suggest that one or more phases have been damaged, and/or one or more driver channels has been damaged. The low speed performance is caused by the damaged phase(s) working "more or less" while at higher speeds more or less is not good enough.