Chain rub can happen to the best of us. The fix for this depends on where the rubbing occurs. If the chain rubs in either your lightest or hardest gears, double check the top/low limits for your front derailleur. If the rubbing occurs anywhere else you may have to try micro-adjusting or play around with the rear derailleur settings.
The front derailleur low/top limit settings depend on your Di2 series. We have added guides for both 1-bolt and 2 adjustment bolt front derailleurs to our installation guides.
If the above links do not help you resolve the issue, please send us an email and we’ll try to help the best we can.