Remove-PSUSystemEvent - Call Canceled/Quota Violation

Getting this when running the following code as a script. I have tried adding a start-sleep after each Remove-PSUSystemEvent, but it still occurs. End result is that system events aren’t being deleted, so each time this script runs there ends up being multiple events for the same thing.

This shows up when ran in VS Code…

$config = @"
[
  {
    "Name": "Bluebeam Revu",
    "EXE": "Revu.exe",
    "Path": "C:\\Program Files\\Bluebeam Software\\Bluebeam Revu\\20\\Revu"
  },
  {
    "Name": "Adobe Acrobat DC",
    "EXE": "Acrobat.exe",
    "Path": "C:\\Program Files (x86)\\Adobe\\Acrobat DC\\Acrobat"
  },
  {
    "Name": "Visio",
    "EXE": "Visio.exe",
    "Path": "C:\\Program Files\\Microsoft Office\\root\\Office16"
  },
  {
    "Name": "Project",
    "EXE": "WINPROJ.exe",
    "Path": "C:\\Program Files\\Microsoft Office\\root\\Office16"
  },
  {
    "Name": "AutoCAD LT 2022",
    "EXE": "acadlt.exe",
    "Path": "C:\\Program Files\\Autodesk\\AutoCAD LT 2022"
  },
  {
    "Name": "AutoCAD 2022",
    "EXE": "acad.exe",
    "Path": "C:\\Program Files\\Autodesk\\AutoCAD 2022"
  }
]
"@
$SoftwareMeteringconfig = $Config | ConvertFrom-Json
If ($SoftwareMeteringconfig) {
    $Events = Get-PSUSystemEvent -Integrated
    $Condition = "TargetInstance isa `"Win32_Process`" and TargetInstance.Name = "
    Foreach ($Software in $SoftwareMeteringconfig) {
        If ($Events | Where-Object { $_.Name -eq $Software.Name }) {
            Try {
                "Removing PSU Event for $($Software.Name)"
                [int[]]($Events | Where-Object { $_.Name -eq $Software.Name }).Id | Foreach {
                    "Removing ID: $_"
                    Remove-PSUSystemEvent -Id $_ -Integrated | Out-Null
                }
            }
            Catch {
                $_.Exception
            }
        }
        "Creating PSU Event for $($Software.Name)"
        $SysEvent = $Condition + "`"$($Software.Exe)`""
        New-PSUSystemEvent -Script "SoftwareMetering.ps1" -Environment "Agent" -Credential "Default" -Type "Create" -Condition $SysEvent -Name "$($Software.Name)" -Integrated | Out-Null
    }
}