I would have replied to the previous thread, but it was locked.
The problem here is that when you put the DRV8818 to sleep, it resets the part including the electrical position of the drive (the datasheet does not mention this). In order to step properly, the electrical position must be restored. This can easily be done by providing STEP/DIR input while the ENABLE pin is high. Then, when the part is re-enabled, it will have the correct electrical position and should operate properly.