You should also consider that the costs you've outlined are not paid "per headcount" but rather collectively for the company / per company site. This means that often the company would need to completely disimss the office location or move to a smaller location.
I do not disagree with you, I'm just showing that money are not some magical points that you allocate with everything else falling into place.
That said, companies that are fully remote (e.g. Gitlab [2]) tend to actually adjust your wage for having similar purchasing power wherever you choose to live. This then encourages the company to hire from inexpensive countries, which has it's own pros and cons.
[1] https://www.forbes.com/sites/abdullahimuhammed/2019/05/21/he...
[2] https://about.gitlab.com/handbook/people-operations/global-c...