stepper overheating after first spin and stays on current to pin 2 3

Set the pins to being inputs perhaps?

Normally a stepper would be continuously powered like this to keep position between moves so that absolute position is kept.

Sometimes an application will reduce power when stationary to reduce heating as stationary (holding) torque is usually plenty. However stepper motors are not designed with efficiency in mind, just with feedbackless (open loop) motion control.