It’s because Edith is the current player; the player is assumed to have access to every item they’re wearing. If you create a second character and make them the current player, Edith’s underwear should be out of scope.
That makes sense, however it would be useful to be able to know if clothes would be out of scope if the character weren’t the player, for example to have different (descr *) text:
You can't see your underwear but you know it's there.
Versus when it’s an outer layer or none of the clothes overlying are opaque:
EDIT: Here is fixed code for testing what conceals the player’s clothes:
(descr *)
(current player $Player)
(if) (* worn by $Player is concealed by $Concealers) (then)
(if) (empty $Concealers) (then)
(The *) you are wearing (is *) on display for all to see!
(else)
(The $Concealers) you are wearing hides (the *) from view.
(endif)
(else)
(* is $Rel $Parent)
(The *) (is *) (name $Rel) (the $Parent).
(endif)
($Obj worn by $Person is concealed by [])
($Obj is #wornby $Person)
($Obj worn by $Person is concealed by [$Parent|$Tail])
($Obj is #under $Parent)
(opaque $Parent)
($Parent worn by $Person is concealed by $Tail)
($Obj worn by $Person is concealed by $Tail)
($Obj is #under $Parent)
~(opaque $Parent)
($Parent worn by $Person is concealed by $Tail)