I had a similar situation when I first shot 9mm. Did much better with 45. I found that I was flinching and had learned to compensate without trying. Bad habit that. The recoil impulse was different in a 9mm so my subconscious compensation didn’t work real well, and I was pulling my shots.
I worked on my flinch, trigger discipline, and keeping my eyes open when shooting, and 9mm started working for me. In essence I realized I had a bigger problem.
I’m not saying that’s your issue, just that it worked for me. So maybe shoot a gun you shoot well, and pay close attention to what’s going on. If you diagnose what you’re doing right, it might help you figure out what you’re doing wrong when the 9mm is introduced.
Good luck.