Not necessarily; it depends on the ability of law enforcement to make a complete investigation. This does not necessarily entail preventing a vessel from sailing, although they can do so with an appropriate court order.
All ships at sea--including yachts--are considered an extension of the soil of the nation under whose flag it sails. For that reason, even though the vessel may be in international waters, if it is registered in, say, the United States, it is subject to U.S. jurisdiction. Also, the Constitution grants Congress jurisdiction over "navigable waters of the U.S." which means that jurisdiction would most likely lie with federal authorities.
The necessity of holding a vessel in port is no different than securing premises on land following a crime. It may be necessary to do so until an investigation is complete; but there is no requirement. Furthermore, it would probably be necessary to obtain a court order to prevent the vessel from sailing if the police deemed it necessary to hold (impound) it. Additionally, the vessel's occupants are entitled to the same Constitutional protections against improper search and seizure as if the purported offense occurred on land.