Packer failing to upload the remote cleanup script

Packer failing to upload the remote cleanup script.
Using Adminstrator account with auto generated password for Winrm connection
Sy prep step is completed successfully but failing on cleanup scripts with http response error 401-invalid content type
I am using packer version 1.7.5
Is anyone having similar issue and can you help

Did you ever find a solution to this? I’m seeing it suddenly on v1.12 while building Win11 images for Azure Virtual Desktop. It only just started. It wasn’t an issue even a week ago.