Yeah I don’t really factor in dress code. The only places that have much of a dress code are what I call “traditional fine dining”, traditional fine dining and “nice restaurant” aren’t synonymous. In the DC area for example most of the best, trendiest, most acclaimed restaurants are not traditional fine dining. They will easily set you back $50/person or more (before drinks), and $70-100+ a person isn’t uncommon. But as long as you don’t come in wearing a burlap sack or something no one is going to critique your outfit.
In most markets traditional fine dining often doesn’t have the top rated food, traditional fine dining has kind of become known for very classic dishes, extremely high levels of service, but due somewhat to their stodginess and conservatism around menu items, in a bustling urban area they usually aren’t the very top end of dining anymore. Most big metros have at least a couple true fine dining restaurants that pull off some form of modern take on traditional fine dining, and that gets rated highly enough that the food is considered really top tier, but as an example, WaPo’s food critic Tom Sietsema puts out an annual list of the best restaurants in DC (I’ve been to some of these), and on this year’s list I think maybe one requires a jacket: The best D.C. restaurants: Tom Sietsema’s 2021 favorites - Washington Post. A couple say things like “no athletic wear, torn clothing, or shorts.”
Meanwhile this place-- 1789 Restaurant | American Restaurant in Washington, DC which is kind of the standard bearer of traditional fine dining in DC–is strictly jacket required, the waiters will be dressed in black tie, and the service will feel right out of the 1970s or earlier (by design.) However while the food at 1789 is good and it’s always decently reviewed, it doesn’t frequently make “top” lists. In some markets, especially smaller ones, where maybe only one historic fine dining restaurant was viable, those have often “decayed” into gross caricatures of their former glory, often kept in busy through sad special events, and the food has usually regressed as well. A lot of those places have not kept up with the times and have decor and menus stuck in the 1970s.