I always wondered whether Giant ships could have floating solar that they haul as well as solar panels covering 1.5 the ship area. Sounds impractical from perspective of current port design but I am sure some clever engineering can solve these issues. Combining this solar + kite/ sails based power + some batteries I am sure one can provide at least 50% of the energy needed for shipping. The bottleneck initially is just the cost of non standard designs being brought into an industry that makes its money off economies of scale and standardization.
I think many people underestimate just how harsh ocean is. Salt doesn't do great with electronics such as connections. Plus you would probably use pretty low barges which suffer from waves and rough seas. Also keeping the right angle will be massive pain for optimal energy gathering. Ships tend to travel in ways that the angle of sun isn't constant.
Not to forget drag and what it means to actually drag something at even speed current cargo ships travel. Traditionally my understanding is that barges are used at much lower speeds.
Right, when it comes to the ocean you also have to remember that hundreds of full containers a year are just swept off of a ship and lost. Floating panels would be outright annihilated in rough seas, and a system to stow them would add a fair amount of complexity.
And again, all of this is overshadowed by the fact that there's enough open unused space on land to power the entire planet with solar by multiple orders of magnitude. You could power 100 earths with ground-based solar and still have room left over.