Are you sure the DRO is getting feedback from the encoder?
Unless the DROs have been specifically setup to use encoder inputs, they only show the commanded position.
What you're describing sounds like a typical encoder fault. The drive commands a move, but doesn't see one, so gradually keeps increasing the output leading to the motor running away. One way to test, would be to disconnect the motor from the machine, enable the drive, and try turning the motor shaft by hand.
If the drive/encoder is working correctly, then the shaft should be locked in placed, and spring back into position once you release it. If it doesn't return, or it starts moving as soon as you enable the drive, then there is a problem with the drive/encoder/wiring.