I'd be surprised if any port would easily permit such a ship to come or go under sail power. Sailing a ship into port is risky at the best of times. Yachts may do it into a marina when the wind and tide are just right for fun it as a little bit of a flex. But ports have work to do and having out-of-control sailing ships three sheets to the wind, so to speak, having misjudged the tide or whatever, is just dangerous.
Also, having your ship stuck in port for days waiting for wind and tide to be suitable for leaving would have been commonplace before engines, as would bring becalmed for weeks on end and being unable to evade dangerous storms. None are probably high on the list of things these ships really want to be doing today.