Error uploading file to $env:TEMP\winrmcp-<>.tmp: Couldn't create shell: http response error: 401 - invalid content type

Building wins2019 image for GCP using CIS win2019-L1 image as base. It worked fine will Sep 1st 2022, when we used this week again it is failing.

Packer code:

source_image_family = "cis-win2019-l1"
source_image_project_id = ["cis-public"]
use_iap = "true"
use_internal_ip = "true"
winrm_insecure = true
winrm_use_ntlm = true
winrm_use_ssl = true
winrm_username = "packer"
zone = "europe-west2-c"
}

build {
sources = ["source.googlecompute.autogenerated_1"]
provisioner "windows-shell" {
inline = [
"reg add HKLM\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\System\\ /v LocalAccountTokenFilterPolicy /t REG_DWORD /d 1 /f",
"reg add HKLM\\SYSTEM\\CurrentControlSet\\Control\\Lsa\\ /v lmcompatibilitylevel /t REG_DWORD /d 0 /f"]
}

Image build ending up with below error

2022/11/17 13:57:13 [INFO] (telemetry) Starting provisioner windows-shell

2022/11/17 13:57:13 Error asking for input: machine-readable UI can't ask

1668673633,,ui,say,==> googlecompute.autogenerated_1: Provisioning with windows-shell...

2022/11/17 13:57:13 1668673633,,ui,say,==> googlecompute.autogenerated_1: Provisioning with windows-shell...

2022/11/17 13:57:13 packer-provisioner-windows-shell plugin: Found command: reg add HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System\ /v LocalAccountTokenFilterPolicy /t REG_DWORD /d 1 /f

2022/11/17 13:57:13 packer-provisioner-windows-shell plugin: Found command: reg add HKLM\SYSTEM\CurrentControlSet\Control\Lsa\ /v lmcompatibilitylevel /t REG_DWORD /d 0 /f

2022/11/17 13:57:13 1668673633,,ui,say,==> googlecompute.autogenerated_1: Provisioning with shell script: /var/folders/28/_kfhvl1j4cvflk0nhxysyl000000gn/T/windows-shell-provisioner1067305319

1668673633,,ui,say,==> googlecompute.autogenerated_1: Provisioning with shell script: /var/folders/28/_kfhvl1j4cvflk0nhxysyl000000gn/T/windows-shell-provisioner1067305319

2022/11/17 13:57:13 packer-provisioner-windows-shell plugin: Opening /var/folders/28/_kfhvl1j4cvflk0nhxysyl000000gn/T/windows-shell-provisioner1067305319 for reading

2022/11/17 13:57:13 packer-provisioner-windows-shell plugin: [INFO] 222 bytes written for 'uploadData'

2022/11/17 13:57:13 [INFO] 222 bytes written for 'uploadData'

2022/11/17 13:57:13 packer-plugin-googlecompute_v1.0.16_x5.0_darwin_amd64 plugin: 2022/11/17 13:57:13 Uploading file to 'C:/Users/packer/TMP/script.bat'

2022/11/17 13:57:21 packer-provisioner-windows-shell plugin: Retryable error: Error uploading script: Error uploading file to $env:TEMP\winrmcp-b6cea10e-3fa0-418c-48a5-ba0d84626cae.tmp: Couldn't create shell: http response error: 401 - invalid content type

2022/11/17 13:57:23 packer-provisioner-windows-shell plugin: [INFO] 222 bytes written for 'uploadData'

2022/11/17 13:57:23 [INFO] 222 bytes written for 'uploadData'

2022/11/17 13:57:23 packer-plugin-googlecompute_v1.0.16_x5.0_darwin_amd64 plugin: 2022/11/17 13:57:23 Uploading file to 'C:/Users/packer/TMP/script.bat'