Pallas wroteI do the regular thing of practicing my socks off until I can play the pieces again and again without a sour note, but then I show up in her studio, and it sounds like I'm playing with my feet.
You don't specify but there are two ways of playing pieces without a sour note; at the beginning of your practise session and at the end of your practise session. (There are other ways but they aren't relevant to the issue.)
At the beginning of a session you're having to rely on what's stuck from the accumulation of effective practise sessions. It's usually a good test of how well you can play generally and how well you play that piece in particular.
At the end of a session you're playing is bolstered by the addition of all that's gone into working memory, recent familiarisation of the piece through many sensory and mental pathways during the session, all that's been restored from recent revision, etc. It's not a good indication of how well you play a piece even if it's a good indication of how well you can play the instrument.
Performance is about the first time through, cold. Practise is about building onto that.
The other point is about your playing in front of your teacher. This is not, or should not be, a performance. Your teacher is not your target audience. At the lesson your playing should be a demonstration of where you are when you're playing 'cold', not about how well you play at the end of a practise session. There should be no adrenaline, it's just a 'look, this is where I'm at, help me progress from here' approach.
With the heightened listening of a performance in front of your teacher you can hear so much more of what's wrong and so much less of what has improved over the week to your playing in general. An audience hearing wrong notes glosses over what doesn't fit the pattern of the music and what doesn't make sense in their head. They might register that a mistake has been made but it means no more than hearing some 'stupid idiot' coughing during the quiet section of a performance or, worse, during the silence between movements.
Teachers, on the other hand, are used to hearing students making mistakes with shaking hands and overemphasis of the tricky bits. They hear the general above the noise of mistakes that you're listening to and they base their advice as much on that as on those mistakes.
It will get better - if you allow it to. You can practise your pieces in particular, as you normally do but also with trying new practise techniques along the way*, you can practise your performance skills in general by, perhaps, recording your practise session. You can also improve your attitude by reminding yourself that your teacher is not an audience for performance but a private assistant who needs to know where you are now, where you need to go and how to get there.
Trust that they can hear your improvements in your playing over time, sometimes, but seldom, even from just week to week. You simply cannot do that - it's not the way we function. Like people spending every day with us see no change in us on a daily basis but distant relations we see only once or twice a year notice significant changes over time.
*See Brent Hugh, PIANO PRACTICING PRINCIPLES AND METHODS, for example.