I ended up changing the critical battery action in Windows and it solved the problem. It seemed that intermittently, while plugged in, the battery would flag up as critical and Windows would put the machine in to hibernate. It did the same with a battery I supplied and one the customer supplied.
In the end the customer was happy to keep the battery he supplied as it actually held a charge unlike his original and just use it with this work around. I stress tested it for a couple days and it didn’t hibernate and he’s been using it since with no problems. Not the best solution but at least he has a working battery and his laptop doesn’t hibernate while plugged in.