For my upcoming cruise (LotS), the RCI app describes the MDR dress code as follows:
"Bare feet, shorts, caps, and tank tops are not allowed in in dining rooms and specialty restaurants at dinner time; lunchtime guests can dress more casual [sic], including polos and shorts for males"
It seems that both dress codes and enforcement can vary from ship to ship. Despite what the above says, I think there's almost no chance that it would be enforced. I last saw a passenger turned away from the MDR for wearing shorts (on formal night) in January 2020.