For me, the issue stems from the difference between practice and public performance. Most of us, I think, practice far more than we perform publicly. Since a primary goal of practice is improvement, and improvement requires self-assessment, a musician can get used to constant self-assessment when practicing.
Understanding that, I think the key is to "turn off" this self-assessment. It is not enough to be able to do this just in performance; rather, one must practice this skill of "not practicing!" The way I suggest is to designate part of a practice as a run-through, just as though it was a performance. Record this run-through! Doing so is important so that you know in advance that any mistakes will be picked up by the recorder for later identification, so it is not necessary to self-assess during the run-through, at least not the way one does in typical practice. You can then listen to the recording to see what problems you had. In all likelihood, you will find problems you did not find during normal practice, simply because the situation is different.
As you try this technique, you will become more adept at turning off the constant self-assessment. You can then focus on the present moment in your music without worry.
I must caution, of course, that not all self-assessment gets turned off in performance. For example, playing in tune requires assessment throughout the performance. If I find that I have gone sharp relative to the ensemble, I will make the mouthpiece adjustment necessary at my next reasonable opportunity. Granted, I can force pitches down, but for my own comfort and better tone, moving the mouthpiece is needed. I could not know to do so if I was not self-assessing in this way. However, doing so does not entail assessing notes already gone by. Instead, it requires "living in the present," as I think you are seeking to do during a performance.