There is a reason, as I’ve answered this question before, that many people think their practice swings are perfect or very good but everything breaks down when they actually swing to hit a golf ball.
That reason is because of exactly that – it’s a practice swing and you aren’t hitting a ball, so the hand-eye coordination that helps you hit a ball doesn’t interfere with that great motion, knowing you’re just swinging.