Haha I love the question! YES this happens all the time and I get to watch them over and over on Youtube hah! I practice a lot and am lucky to have spent so much time on stage and even tho experience helps immensely, theres still a few BAD mistakes every night but that’s how you know you care about what you are doing. All you can do is to try and “practice perfectly” and what I mean by that is that you need to practice in context. For a very few limited examples, basic practice should be well rounded including chords, scales, and application, to backing tracks or a metronome very very slowly at first or else you’ll develop bad habits which are harder to break than developing good habits. If you are having trouble with live performance, try to recreate the atmosphere as best you can such as playing standing up, through the amp you use, and at stage volume(if your parents and neighbors can handle it) to name a few. Hope this helps!