I found this issue when updating my resource pack's UI. Buttons display fine if it is a perfect box, like a rectangle, but as soon as I add some shape to that button, it looks really weird. I noticed it also acts a bit weird with the achievement text box. It might be affecting other UI elements too.
I made this special texture to more easily show the issue going on.
Thank you for your report!
The texture mapping of buttons has been changed a while ago in 23w31a. Buttons use nine slice tiling, which you can tweak using a mcmeta file. Please refer to that version's changelog for more information: https://www.minecraft.net/en-us/article/minecraft-snapshot-23w31a
We're tracking this issue in MC-264573, so this ticket is being resolved and linked as a duplicate.
That ticket has already been resolved as working as intended, which means this is not considered a bug and won't be fixed. Please do not leave a comment on the linked ticket.
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 (Technical Issues) – 📧 Microsoft Support (Account Issues)
📓 Project Summary – ✍️ Feedback and Suggestions – 📖 Game Wiki