Yes drain flies will typically go away on their own when winter approaches which has been my experience.
But what you can do to get rid of the drain flies is to use some vinegar, baking soda and hot boiling water to clear the drain out.
To get rid of the drain flies you should pour a cup of baking soda into the drain, then pour some vinegar down the drain and let it sit for an hour or so.
Then pour some boiling hot water down the drain which will clean the drain and will get rid of the drain flies.
The boiling hot water will kill off any potential drain fly eggs in the drain so that they won't hatch and become more drain flies.
You can also use some bleach in the drain which will kill the drain flies and I would recommend pouring a cup of bleach down your drain every week or every few weeks to help disinfect your drain and keep the drain flies away.