The Bug
The name of the "Hero of the Village" status effect is too long to fit into the effect box in the inventory. This is also an issue with other status effects with specific amounts of levels.
Steps to Reproduce
Grant yourself a potion effect that has a long name:
/effect give @s minecraft:water_breathing 60 7
Open your inventory and look at the potion UI
❌ The potion name appears outside of its box
Observed Behavior
Long potion effect names can appear outside of potion UI boxes.
Linked issues
is duplicated by
Attachments
Comments
Can confirm in 20w51a.
Can confirm in 21w05b.
Can confirm in 21w06a.
Can confirm in 1.16.5 and 21w08b.
Can confirm in 21w11a.

Can confirm in 21w18a.
Can confirm in 1.17.1. You can use the following command to reproduce this issue:
/effect give @s minecraft:hero_of_the_village 60 7
Can confirm this behavior in 21w39a, though this text is no longer able to appear in the inventory, as the potions UI have been moved to the right side.
Can confirm this in 21w44a. Please note that this issue isn't exclusive to the "hero of the village" effect and can be reproduced with other potion effects as well. Here are some extra details regarding this problem.
The Bug:
Long potion effect names can appear outside of potion UI boxes.
Steps to Reproduce:
Grant yourself a potion effect that has a long name.
/effect give @s minecraft:water_breathing 60 7
Open your inventory and look at the potion UI.
Take note as to whether or not long potion effect names can appear outside of potion UI boxes.
Observed Behavior:
Long potion effect names can appear outside of potion UI boxes.
Expected Behavior:
Long potion effect names would not be able to appear outside of potion UI boxes.
Can confirm in 1.18.1.
Can confirm in 1.18.2.

Present in 1.19-pre1.

Present in 1.19-pre2.

Present in 1.19-pre3.

Present in 1.19-pre4.

Present in 1.19-pre5.

Present in 1.19-rc1.

Present in 1.19-rc2.

Present in 22w24a.
Can confirm in 1.19.1.
Can confirm in 1.19.3

Present in 1.19.4.

Can confirm in 24w14a. Not only it causes issues in the source language, but it's also a real annoyance for translations. For example, "Raid Omen" should be translated in Italian as "Malaugurio dell'incursione", in order to be consistent with already used translations, but that is way too long for the tiny effect box.

Relates to MC-273502
Not really, those are two completely separate GUIs.