This is because you dont limit the cameras position,
the camera itself is still moving beyond the limits but the viewport isnt.
try something like this:
position = Vector2(clamp(position.x,limit_left+get_viewport_rect().size.x/2,limit_right-get_viewport_rect().size.x/2),clamp(position.y,limit_top+get_viewport_rect().size.y/2,limit_bottom-get_viewport_rect().size.y/2))
This will use the limits you gave the camera.