This will sound strange to you but the fact of the matter is the .40 recoil causes the snap and slight twist of the gun when fired. The .45, as said before me, is a slower round. Its recoil is more of a push back into the hand and thus easier to get back on target. I also would say, you may be anticipating the .40 recoil and its unpleasantness. With the .45, no anticipation. Only guessing here
! Practice with the .40 will improve your shooting. One thing to do is to have someone load your mags with dummy rounds mixed in with live. Your flinching will become very obvious here.