A sub could catch a cv on the surface depending on its course or change of course.
But then you might as well up a PT boat if you're going for a surface attack. I don't really see how U-boats can be used effectively in the MA. They can't attack a port effectively because the VH/ack is on land, and if a deck gun is an option, it still wouldn't be used because it has to surface, and the PT can do that faster and easier.
It can't attack a CV group while submerged in a chase, and the only chance it'll get is a frontal attack or as the CV passes through. Which means it has to be rather close to CV, and that means there will be planes near the CV. Not too much fun for a sub in that situation.