Steps to recreate
Name 2 blank banners simultaneously in an anvil (so they stack)
Place one of them on the ground
Break it and pick it up again
The banners no longer stack
Also works with non-blank banners but these wouldn't stack anyway because of MC-251509.
Cause
Before placing, the named banner has the following NBT data:
{RepairCost: 0, display: {Name: '{"text":"Test"}'}}
After placing and breaking, the banner loses the RepairCost tag:
{display: {Name: '{"text":"Test"}'}}
The items' NBT data doesn't match so they no longer stack.
This bug may seem the same as MC-251509 but they are not caused by the same thing. MC-251509 is caused by the id tag disappearing when placing and breaking. This bug is caused by the RepairCost tag disappearing, a tag only appearing on named banners.
Linked issues
Comments


I don't think this is a duplicate of MC-151793. I just checked some ominous banners in my survival world, all obtained in 23w12a from both patrols and raids, none of them have the RepairCost that is causing my bug. It seems that MC-166329 was incorrectly marked as a duplicate because the issues look very similar but are actually caused by different NBT tags not working as intended. In this case a tag that only shows up when manually renaming something.

Thank you for your report!
We're tracking this issue in MC-125046, so this ticket is being resolved and linked as a duplicate.
If you would like to add a vote and any extra information to the main ticket it would be appreciated.
If you haven't already, you might like to make use of the search feature to see if the issue has already been mentioned.
Quick Links:
📓 Bug Tracker Guidelines – 💬 Community Support – 📧 Mojang Support
📓 Project Summary – ✍️ Feedback and Suggestions – 📖 Game Wiki
Duplicate of MC-151793 (per MC-166329).