Software Engineers outside the US make less, full stop. Amazon has a COL adjustment for SF and NYC but it’s not as much as you might think. Not as sure about other companies but I believe Google is similar (they also have a small local office).
The best setup IMO is to work at a FAANG company outside the bay, it’s the best of both worlds. Supposedly Amazon pays p90 of market rate, but in my area it’s more like p99.
I’ve heard that working remotely (full time) for Facebook, Google, or Netflix is nearly impossible though unless you’re truly indispensable to the company. This may be 1-3% of their employees that can actually leverage that option?