I could be mistaken, but my understanding is that this is a feature and not a bug. A bow with both Mending and Infinity would arguably be overpowered and therefore these enchantments are mutually exclusive.
I told my friend about this bug and he suggested breaking the block that the banner is sitting on/attached to. It worked in my world. I know it doesn't technically count as a fixed bug, but it's a suitable workaround in the meantime.
I could be mistaken, but my understanding is that this is a feature and not a bug. A bow with both Mending and Infinity would arguably be overpowered and therefore these enchantments are mutually exclusive.