It doesn't need a "fix", as it is working as it should. The camera will always zoom to your mouse pointer location when no enemy ship is locked properly.
It is due to the locking mechanism. You know, about how your shell will hit the mountain that is behind your enemy ship even though your mouse pointer is hovering in front of your enemy ship when not locked in? This is the same case in this situation. When you zoom into artillery view when not locked in properly, your zoom will be way off behind your actual intended target.
This is also due to how wonky the automatic locking is as it sometimes locks onto the wrong target when multiple enemy is near each other or sometimes unlocks itself when your mouse pointer is too far off target. In order to zoom directly on top of enemy ship you wanted to zoom into especially when using artillery view, make a habit of using the "x" key to do manually locking every single time before zooming. It will then lock properly and zoom in properly.