I don't consider what Princess does today as a dress code but more of a suggestion.
Yes, they do mention on their web site what to expect on casual and formal evenings, but it's presented only to give people some idea of what to wear.
If you like to dress up, then do so, but either way nothing will be said if you don't.
Decent shorts are also being accepted on casual evenings on the ships we've traveled on in the past two years. My husband wore his cargo shorts one evening with a polo shirt and it was acceptable although it was only one time since the DR was cold & he preferred his jeans with a T shirt.