I have to say, I find it weird how focused Americans are on dress codes in offices. In Germany that's pretty much not a thing, unless you have direct contact to customers (bank teller, etc).
Granted, as a developer standards are lax anyway, but I don't even own a dress shirt or suit.
Could you get away with whatever you went to sleep in though? That's the advantage of WFH. Get up, do your work, don't bother getting dressed unless there's a meeting. If you need a shower and a change, you can do it on your break.
I agree that American office dress codes are bullshit, but being allowed to be as comfortable as you like in your clothes is, I am guessing, frowned upon even in Germany.
I worked a hybrid schedule. I didn't bother getting dressed until the other half of the day I went into the office. And I was more productive at home because I was more comfortable in every way including the fact that I could just do my work in boxers and a T-shirt.
Not getting dressed at least somewhat is a sign of depression.
When I still went to the office, I wore the exact same cloth I would wear when I was just going outside. Clean, not significantly more holes than intended.
It can be either. Things like thar absolutely are warning signs of depression, and ignoring that is dangerous. Doesn't mean everyone (or even the majority) of those that do have depression, but that doesn't change that it is a warning sign.