The Bug:
Entity names aren't affected by the blindness or darkness effects if they're behind blocks or entities.
Steps to Reproduce:
Begin facing a certain direction by using the command provided below.
/tp @s ~ ~ ~ -90 0
Summon a husk in front of you that has a name and give yourself the blindness effect by using the commands provided below.
/summon minecraft:husk ~7 ~ ~ {CustomName:"\"MC-239810\"",CustomNameVisible:1b,NoAI:1b,Silent:1b}
/effect give @s minecraft:blindness 999999 1 true
Take note of how you correctly aren't able to see the husk's name.
Summon a wall of blocks between you and the husk by using the command provided below.
/fill ~6 ~ ~6 ~6 ~4 ~-6 minecraft:stone
Take note as to whether or not entity names are affected by the blindness or darkness effects if they're behind blocks or entities.
Observed Behavior:
Entity names aren't affected by the blindness or darkness effects if they're behind blocks or entities.
Expected Behavior:
Entity names would be affected by the blindness or darkness effects if they're behind blocks or entities.
Issue present in 1.17.1