Usually the problem is that you are not sheeting the main hard enough. It is common to think that you have the main sheeted in tight, but if someone is following you behind your boat, they can see that the leech is falling way off.
The other usual problem is that the jib is sheeted too tight or is being sheeted from the wrong sheeting point, so it is backwinding the main.
Or it could be that you don't have your outhaul on the main tight enough or that you don't have the correct mast rotation (pointed toward the leeward sidestay).