If you configure S2S and both sites have the same subnet, you need to add a NAT rule to translate both your local subnet and the remote subnet on the other site.
Description below:
In the Communities settings, you still define the actual local and remote subnets. Then, you need to create two different subnets for the NAT configuration.
At this point, both sites must allow firewall rules for those NAT subnets instead of allowing the real subnets.
After doing so, each site will only see the other’s NAT subnet, not the real IPs.