After naming a red mushroom on an anvil, I placed it in a potted plant, and upon right-clicking to retrieve the red mushroom, the name was gone - this also happens with dandelions and cornflowers, so I assume that this is likely the case for any potted plants. If bees can retain names when entering/exiting hives, I believe it should also be allowed for potted items to retain such data when being potted/removed. I hope it's right to call this a "bug," since it seems that anvil name retention was not implemented in flower pot-specific cases.
Related issues
Comments

Thank you for your report!
However, we are already tracking this issue, and this report is a Duplicate of MC-209, which is a report that has not been resolved yet.
If you want, you can upvote the parent ticket, and enable watching to receive any updates about it - if you believe you have any information that may be important for this issue, please leave a comment on the parent. Please also use the search function in the future to prevent duplicate reports.
Quick Links:
📓 Issue Guidelines – 🛠 Community Support – 📧 Customer Support – ✍️ Feedback and Suggestions – 📖 Game Wiki
💬 Mojira Subreddit – 💬 Mojira Discord