I hate misted up goggles. For me at least, “Anti Fog” coatings work (but not for long) though cooling one’s face (in the water) before putting the goggles on also helps.
I reckon its contamination on the Anti Fog coating that stops it working as it should.
Historically I have carefully cleaned the goggles every few weeks with Fairy Liquid applied with (thoroughly wet) toilet roll so as to avoid scratching the coating, and that worked reasonably, but recently I have found an answer that works fantastic.
When I have my “after swim shower” I always take a little bottle of shampoo, in fact I keep it with me by the poolside* whilst I am swimming so I do not have to go back to the locker before showering. I now also take a small bottle of concentrated Fairy Liquid / water solution, tip a little into each goggle, swirl it around and then thoroughly wash them out under the shower, if you do not the anti fog will probably still work but your eyes might not appreciate the stinging… It literally takes one minute or so and my goggles are getting cleaned every time I swim and whilst any contaminant is still wet. Since I have started this a few weeks ago I hardly ever get misted up goggles even with ones which were fogging up before, and I only use relatively cheap ones (Speedo Jet).
*once or twice I have had people asking me if it’s a high energy drink !