My dad had a number of identical shirts, trousers, pants and socks so I used to whip the dirty ones away and replace with clean and he never knew, he thought he changed them himself, he also thought that he washed them himself, he didn't.
Of course that means that you need to be there before he gets up or after he goes to bed. I had a key so I could just turn up early, make him a coffee that he could drink in bed and swap the clothes when he wasn't looking.
I found that as the dementia worsened, it became easier to do these things.
I have read that some carers have resorted to spilling something, preferably cold or slightly warm over there PWD as an excuse to wash the clothes immediately, after all nobody wants to wear a shirt or trousers covered in cold custard or similar. I never tried that one myself.