The Spanish expression al garete means literally "to drift" or even "to sink" depending on the context (among other figurative meanings). The Royal Spanish Academy considers the word garete to have an uncertain origin. Spanish etymologist Joan Corominas considers most plausible the origin of the word as being derived from French être égaré, which I think it's closer to "to be lost", please correct me if I am wrong.
In fact, the 1899 edition of the Royal Spanish Academy dictionary did consider garete as a derived word from French égaré, although that etymology was afterwards discarded. Corominas considers the French origin as only a hypothesis because he could not find any text in French using the expression être égaré applied to a ship in a nautical context.
I have found a case of the Spanish expression venir al garete in a text written in 1594:
[...] ví venir muchos barcos al garete y se ahogó mucha gente [...].
I saw many ships sinking and many people drowned.
I would like to determine if that hypothesis is really plausible. I have seen in the CNRTL that the word égarer was already used in 1120 as "to lose the right way", maybe in religious contexts. But is there any evidence that the verb was used in French texts by the time of the previous example (before 1600) in nautical contexts to convey the meaning of ships drifting or sinking?