If they are hidden underneath they are (1) effectively undergarments not shorts; and (2) none of anyone else's business.
Plus how would anyone know you're wearing them ? The dress is the outer, visible, layer and satisfies the dress code.
Personally, I find the ship can be rather cool indoors, especially in the dining rooms, so if I wear a dress I usually wear leggings underneath it - solves the feeling exposed issue, provides warmth, and avoids nylons, all in one. My preference is
Tees by Tina leggings, which I find quite comfortable and well-suited for the purpose (
https://teesbytina.com/collections/tees-by-tina-leggings).
SW