It’s a slight difference. Pepsi has 40.9g of sugar for a 375mL serving size, and Coke is 39.8g for the same.
https://www.rethinksugarydrink.org.au/how-much-sugar
That said, Coke is actually a very complex drink. Which is readily apparent from the various DIY recipes that are floated online. Mixed alcoholic drinks aren’t nearly as complicated as Coke. That “with a bit of flavour” part is doing a lot of heavy lifting.
Can people who “enjoy” a Rum + Coke actually tell?