I believe (and I'm by no means an expert at this game) that your problem is that your naval stockpile slider is too low, meaning that the ships aren't getting all the supplies they need. This, in turn, means that they take attrition when in port. However, if I'm wrong on this point, someone feel free to correct me.