I had a similar problem once, in my case it’s a linear drive and it wouldn’t hold course. I couldn’t figure out what had happened as it worked perfectly prior to haul out. I called Raymarine UK and an engineer asked if I had removed the drive, which I had done. There were two black and red wires going to the drive that I logically reconnected black to black and red to red. In fact in my case they should have been inverted!