The link you sent has expired. And the description is not clear, so I can't guarantee fitting answer.
From what I can understand, you need to have blocks placed in the position of the mouse cursor, but if you move the camera to a different place, it's doesn't adjust to it.
I'm assuming that you use this code for getting mouse position:
It gives you global mouse position. And when the camera isn't lining up, it will be incorrect.
To get mouse cursor position relative to camera, use this: