Depends on the sock. Some are more fine than others, vendors will list the microns to let you know. Maybe a large mesh wouldn't catch it but the fuzzy ones do for sure. I make my socks out of cheap felt from Walmart and they caught a ton of diatoms. Often this issue goes away on its own after a while because they need silica like cyclist said. That can come in as part of the rocks and sand you set the tank up with, and run out after a month or so. I think it goes faster with a filter sock catching them because of you take the dead ones out of the tank then they aren't rotting and releasing that silica back into the water for more diatoms to use. But that's just a theory, I don't think anybody has done it both ways to see for sure.
It's annoying but it goes away on its own if you use good water.