It kinda depends on where and how you will use it. What you want is for the prop to remain in the water during use. In coastal sailing with waves and chop or an area with lots of power boat wake, a longer shaft might be better. In marinas and on lakes with flat water, a short shaft should be fine.
For me, the mistake of having a shaft that is too short (prop coming out of the water) is way worse than the mistake of having a shaft that is longer than necessary (slightly less efficient operation).
As you are probably aware, the more important considerations are HP and prop size.