There’s a dress code in my office and I’m pretty sure it’s my job to enforce it.
Luckily I work with adults and I’ve never had to even mention it. I don’t care that one woman (who now left) always wore sweatpants. Or the one guy who always wears a t-shirt. They both get their jobs done without making anyone miserable, so it’s fine. Making t-shirt guy put on a polo wouldn’t make him work harder.