Both Stepper and AccelStepper work weird with L298 stepper driver

I’ve tried using both AccelStepper::HALF4WIRE and AccelStepper::FULL4WIRE for Nema 14 + L298 and all possible pin combinations
But i have a trouble that stepper motor moves with grinding noise and much vibration
If I manually manage pins like

    digitalWrite(D2, HIGH);
    digitalWrite(D4, HIGH);
    digitalWrite(D2, LOW);
    digitalWrite(D3, HIGH);
    digitalWrite(D4, LOW);
    digitalWrite(D5, HIGH);
    digitalWrite(D3, LOW);
    digitalWrite(D5, LOW);

There is no noise and stepper works smoothly. I can’t see why libraries don’t do this. Any advice?
PS I plan to switch to DRV8825 driver, but they will arrive in month+ only. Post here is slow. Need something now and now I have only L298