Theres several reasons why this can be, but in my own experience it came from a bad diet, poor hydration, and a sedentary life style. All of these things make your ability to focus worse. Reversing these practices, especially by getting intense cardio every day will basically have an immediate impact. I know it sounds weird that exercise and gaming go together, but they do.
It could also be that you’re just nervous, in which case, I’d say dont look at the match as a win/loss. Look at it as a way to improve and learn regardless of the outcome.
Other times, I simply had a friend point out what I was doing wrong in the match. I was playing in a tournament against a really good zoner, and my friend was just telling me all the stupid mistakes I was doing, I made the adjustment and it worked.
Its really difficult to teach yourself to do the things you WANT to do on the fly. Thats where casual matches with friends comes in, where you keep what you want in mind and try to find a way to get it in the match. Eventually youll be able to think more about what you’re doing in the match and be able to come up with new solutions on the fly that you’ve never done before. Believe it or not, getting good at fighting games is about training your mind and making your muscle memory be more connected to your mind and the decisions it makes. So its going to take time and effort. Go into training mode and do whatever you’re practicing a million times to do the point where it feels completely natural to do it, go into a casual match, use whatever you’re training in the easiest way to get it as possible (for example a punish, even if its not optimal) so that you train your mind to use what you’ve been working on in a tense situation.
Spacing often comes down to matchup experience too.