You can undeploy PCG, but first you must delete all logical entities associated with it, that you created.
To undeploy PCG, click from in CSM.
The default entities created by NSX Cloud are removed automatically when a PCG is undeployed.
Delete all the logical entities you created in NSX Manager before undeploying the gateway. Refer to the list below to find your entities to delete:
Public cloud DNS entry
DDI: DHCP profile
Routing: SNAT rule
Routing: static Router
Routing: Logical Router Port
Routing: Logical Router
Fabric-Nodes: Edge Cluster
Fabric-Nodes: Transport Nodes
Switching: Logical Switch ports
Switching: Logical Switches
Fabric-Transport Zones: Transport Zones