As long as your consistent with how you weigh yourself I don’t think it matters when you do it. Personally I weigh after my shower and any “elimination” that is needed
I have found on the days I see my doctor that their scale is always about 3-4 pounds heavier than my scale, but the weight loss is the same (i.e. if I weight 253 at home and it’s a pound loss, their scale has me at 256 but also a pound loss). So the weight loss number is correct, if not the total weight matching.
Also, in addition, I have found that its not always the weight that is important, it’s the inches. I was bothered back in June because I was losing NO weight for about a month (I was in the 280 range at that time) but my pant size went from 48 to 44. I was gaining muscle and losing fat, but the weight was remaining. Easy to get discouraged if you use just weight as the barometer. Use clothes fit. I am down to a 40 waist now and right at 253 pounds (and the 40’s are loose but can’t keep buying clothes!) Good problem to have though.