Grid not drawing to full width and height on zoom

Godot Version

4.2

Question

Help me find the error in my code. On first render it works as expected pan left right up the grid replicated an infinite grid. When i zoom out the grid line stop at the old width and height need then to expand the full lenght.

Camera Script

public partial class GridCamera : Camera2D
{
    private Vector2 _lastMousePos;
    private float _zoomLevel = 1.0f;
    private float _zoomSpeed = 0.1f;

    public Vector2 CameraGlobalPotion { get; private set; }
    public Grid QGrid { get; private set; }

    public override void _Ready()
    {
        CameraGlobalPotion = GlobalPosition;
    }

    public override void _Process(double delta)
    {

        // Zoom camera
        if (Input.IsActionJustPressed(InputConstants.ZoomIn))
        {

            Zoom += new Vector2(0.1f, 0.1f);

        }
        else if (Input.IsActionJustPressed(InputConstants.ZoomOut))
        {
            Zoom -= new Vector2(0.1f, 0.1f);
           
        }
        if (Input.IsAnythingPressed())
        {
            var horizontalInput = Input.GetAxis(InputConstants.Right, InputConstants.Left);
            var verticalInput = Input.GetAxis(InputConstants.Down, InputConstants.Up);

            GlobalPosition = CameraGlobalPotion with
            {
                X = CameraGlobalPotion.X + horizontalInput,
                Y = CameraGlobalPotion.Y + verticalInput
            };
            CameraGlobalPotion = GlobalPosition;
        }
    }
}

Grid Script

using Godot;
using System;


public partial class Grid : Node2D
{
    private Camera2D GridCamera;
    private int CellSize = 32;


    // Called when the node enters the scene tree for the first time.
    public override void _Ready()
    {
        GridCamera = GetParent().GetNode("GridCamera") as Camera2D;

    }

    // Called every frame. 'delta' is the elapsed time since the previous frame.
    public override void _Process(double delta)
    {
       QueueRedraw();
    }

    public override void _Draw()
    {
        DrawGrid();
    }

    public void DrawGrid()
    {

        Vector2 viewportSize = GetViewportRect().Size;
        Vector2 cameraPosition = GridCamera.Position;
        float viewportRight = viewportSize.X * GridCamera.Zoom.X;
        float viewportBottom = viewportSize.Y * GridCamera.Zoom.Y;

        float leftmost = -viewportRight + cameraPosition.X;
        float topmost = -viewportBottom + cameraPosition.Y;

        float left = Mathf.Ceil(leftmost / CellSize) * CellSize;
        float top = Mathf.Ceil(topmost / CellSize) * CellSize;

        float bottommost = viewportBottom + cameraPosition.Y;
        float rightmost = viewportRight + cameraPosition.X;

        int xCount = (int)(viewportSize.X / GridCamera.Zoom.X + 1);
        int yCount = (int)(viewportSize.Y / GridCamera.Zoom.Y + 1);

        // Draw horizontal grid lines
        for (int x = 0; x < xCount; x++, left += CellSize)
        {
            DrawLine(new Vector2(left, topmost), new Vector2(left, bottommost), Colors.White);
        }

        // Reset left position for vertical lines
        left = Mathf.Ceil(leftmost / CellSize) * CellSize;

        // Draw vertical grid lines
        for (int y = 0; y < yCount; y++, top += CellSize)
        {
            DrawLine(new Vector2(leftmost, top), new Vector2(rightmost, top), Colors.White);
        }


    }
}