GH API PUT - unable to parse json error through C#

I am currently trying to set branch protections using gh api and its working fine on standalone powershell command when I run this:

'{"required_status_checks":{"strict":false,"contexts":[]},"enforce_admins":true,"required_pull_request_reviews": {"dismiss_stale_reviews":true},"restrictions":{"users":[],"teams":[],"apps":[]}}' | gh api -X PUT repos/<orgName>/<repoName>/branches/main/protection --input -

However, I need to use this as part of my C# program for which I am running ProcessStartInfo which takes in a .exe file and the command to pass in. Currently, I have passed in powershell.exe and have tested that it works fine for commands like Write-Host and some basic git commands as well.

However, when I pass the same command as above which I passed in powershell, it’s failing with Problems parsing JSON (HTTP 400). This is the string I am passing in as command to the powershell process from within my .cs file (with ‘\’ being used as escape for "). How else should I pass the json as input to gh api?

"'{\"required_status_checks\":{\"strict\":false,\"contexts\":[]},\"enforce_admins\":true,\"required_pull_request_reviews\": {\"dismiss_stale_reviews\":true},\"restrictions\":{\"users\":[],\"teams\":[],\"apps\":[]}}' | gh api -X PUT repos/<orgName>/<repoName>/branches/main/protection --input -"

For completeness, I did print out the command before executing in the .cs file and it shows up correctly like in the powershell as below

'{"required_status_checks":{"strict":false,"contexts":[]},"enforce_admins":true,"required_pull_request_reviews": {"dismiss_stale_reviews":true},"restrictions":{"users":[],"teams":[],"apps":[]}}' | gh api -X PUT repos/<orgName>/<repoName>/branches/main/protection --input -