Of course there must be a place for self-criticism and analysis, because it drives understanding and improvement. There is a time and place for it and but it’s not while one performs, whether that’s writing or making music or playing basketball. Letting the DMN comment while one performs, in my view, doesn’t lead to anything good.
Many times I improvise melodies for a piece I am working on and I even resist analyzing it after the performance. I walk away, leave the studio, and return the next day. Stuff that I thought wasn’t very good often turns out to be the best material and melodies that I liked right away don’t hold up the next day.