Off the top of my head I can't think of anyone being turned away. I also can't think of any instant, in all of my cruises, of seeing anyone flagrantly violating the evening dress code.
I know I would remember a flagrant violation.
I know I felt so "naughty" when I wore jeans to Mama's Italian restaurant on NCL. (perfectly acceptable and within the dress code)
I do know I have been "overdressed" among my tablemates when I have worn a jacket and tie on informal nights on Celebrity and a sports jacket on Royal Caribbean.