Is that a trailer? When storing, raise or lower the tongue so there's a tilt to help the water drain instead of pooling.
When installing a new one, mount the top brackets below the awning rail. You might even be able to eliminate the trough that way.
You might also consider replacing the rail with one which has an integral drip channel: