Important note: This affects all versions from (If I recall correctly, it's been a while and i've just dealt with it) 1.21.8 and up.
For the issue to make sense, context needs to be provided. Text displays can be used to make custom Hud UI or GUI (The image provided is an example of a menu inside of minecraft with a custom cursor, fully in vanilla. Stuff like this should be kept possible and preserved.) when riding the player. Pre 1.21.8 text displays' z axis display translation would work as a layering system on a canvas. A display put on layer -100 would render behind a display put on layer -50. Somewhere down the updating line this system was broken, and text display backgrounds would render on top of text when put on any layer, this is still the case. Before and including 26.2 we could fix this by giving text displays a background opacity of 1 to render correctly on their layer, this is no longer the case in 26.3 and up.
Text display background rendering is Extremely flawed when interacting with multiple text displays. Depending on where the display entity is on the X axis of the screen, rendering for displays placed on different layers (or on the Z axis) can be altered. Additionally, text displays that overlap each other when on different layers render incorrectly in recent versions. (For example, a text display with its text as “<space:20><newline>” placed on layer -100 will blacken out a text display with the text “Hello!” on layer -90.)
TLDR; the X axis also contributes to the "depth", or Z axis in translation on text displays in a way.
There are a lot more issues with text display background rendering that I have not covered or discovered yet, if you do attempt to fix the rendering issues involving text displays you’ll find them pretty quickly.
The attached videos demonstrates issues in 26.3+, study the text closely and observe how it interacts with the background depending on its X translation.
Environment
Issues persists for all players of all modded and unmodded environments.
Thank you for helping us improve Minecraft! We saved your files: