Pretty sure the same soda from cans vs bottles rarely has the same formula. Specifically Coca-Cola, it tastes way different !
I unfortunately don’t have the source but I did read that soda from glass bottles taste slightly different because the caps aren’t 100% airtight, so a little bit of carbonation escapes and a little bit of air gets in.