VisibleOnScreenNotifier3D offset in non-cardinal directions?

Godot Version

v4.4.stable.mono.official [4c311cbee]

Question

I’m trying to confine a camera to a rectangular area on the XZ plane by making the camera stop moving when it sees a certain VisibleOnScreenNotifier3D.

I’ve gotten it working in the cardinal directions, but when I rotate the camera 45° to the left, the VisibleOnScreenNotifier3D suddenly behaves as if the point at which it becomes visible is much further into the rectangular area than it actually is.

It’s probably easier to explain with a short video:

The basics of the code are as follows, with a few bits that should be irrelevant to the current problem commented out:

private void BoundEntryExit(int angle, bool entered)
{
    //keep track of which bounds are on screen
    camBoundInfo.SetVisAndOverride(angle, entered, isRotatedIncrement);

    /*if (isRotatedIncrement % (Math.Pow(2, camRotPower) / 4) == 0)
    //enable and disable movement in cardinal directions
    {
        camBoundInfo.CamMovements[(angle + (isRotatedIncrement / (int) (Math.Pow(2, camRotPower) / 4))) % 4] = !entered;
    }*/
}
private partial class CamBoundInfo
{
    /*public bool[] CamMovements = [true, true, true, true];*/
    public bool[] BoundsVisible = new bool[4];

    public void SetVisAndOverride(int angle, bool entered)
    {
        BoundsVisible[angle] = entered;

        if (angle == 2) //2 is north
        {
            if (BoundsVisible[2] == true)
            {
                GD.Print("north wall entered vision");
            }
            else
            {
                GD.Print("north wall left vision");
            }
        }
    }
}

private readonly CamBoundInfo camBoundInfo = new();

I’m happy to provide more of the code if this isn’t enough to diagnose the problem; I just want to make sure this isn’t a common problem with the way VisibleOnScreenNotifier3D nodes work first.