IMO, I have been on many X cruises.
Dress code is NOT enforced, at all.
We have seen folks in MDR wearing shorts, flip flops, tank tops, etc, staff did nothing.
I think staff is afraid to confront people who break rules, seen it many times over and over.