I don’t remember seeing anyone try to enter the MDR in shorts before the restart, it certainly may have happened though.
Now it happens on almost every sailing. I see people in shorts turned away occasionally, but more often, they are allowed to enter.
No one can predict whether the no shorts or ball caps policy will be enforced on any ship on any given night. It depends on the dining room manager.