Ok this is much more easier:
$Camera.position = get_global_mouse_position()
and then in your camera, go to Smoothing and turn it on.
it's up you whenever you'll experiment on this one
I tried it in my test and if you want a camera that follows player at the same time pan in your cursor a little bit
change the code above to :
$Camera.position = get_local_mouse_position()