What brand is the battery?
"no brand" batteries are always wacky, weak and not reliable.
If you bought a "X" batterie, that could be the reason. Unfortunately, especially in battery world, you get what you paid for.
Whatever is the batterie, check the 3 yellow wires from rectifier to alternator. The connector that ducati puts to link alternator to rectifier is a PIECE OF S..T: it likes to corrode, then boil and to conclude it melts.
If yours is down, go to this link and see how Oldfart (Oldfart ROCKS!) saved my Rectifier/Batterie/Bike/Bucks.
Alternator/recifier yellow wire BURNT
Even if your yellow wiring is OK, have in mind to do that. It's EASY, QUICK, NOT EXPENSIVE.
If the issue is only batterie related, try to charge it with an optimate. If the batterie is out, go for a YUASA YT12BBS or PRESIDENT GT12B4.