I usually set my stuff in a real world setting with some fantastic element desu and I usually do worldbuilding as I write, though if that expresses itself as something that happens right then or as something I write down for later reference is a whole other thing.
To corral my own nitpickyness I usually keep the main locales vague in my original works unless the specific real world location is important to the story. The idea of the location like somewhere vaguely Texas or New Zealand is more important to me. I get a bit of artistic freedom with how I build a town rather than being held to the reality of one. With that said I will do the research on real cities and towns if my characters happen to visit them for a chapter or something.