I had this a couple of times. I give an order to a ship before I realise that it's being retrofitted at a yard. The ship starts doing what it was told to do, thereby aborting the retrofitting process.

The info panel shows that the ship's design is still the same as before retrofitting, but there's be a remark indicating that the ship is retrofitting from design x to design x. The ship's right-click menu doesn't have the retrofit submenu, right clicking on a shipyard only issues a patrol order.

Is there any way to make the ship to go back to the yard and continue retrofitting?