Using the synth's factory reset code will disable Gabriel and keep the fight limited to a few raiders. On reaching the top of the ship Gabriel will initiate conversation, and no matter what, a fight will break out. Upon entering the cabin, the courser companion, X6-88 will initiate a conversation and provide Gabriel's recall code. Once he is collected, fight along with the network of ships until the target is reached. There will be a courser companion at Nahant Wharf or the shore northeast of Nordhagen Beach, depending on from which direction the player comes, who needs to be collected first.
Speak with Father about the Institute, he will request help dealing with a renegade synth turned raider at Libertalia.