The hiring company cannot treat you as a regular employee though (you are essentially a contractor), so you may have less 'rights' than a regular employee - i.e. your contract can likely be terminated a lot easier than a regular employment one. You may also not be able to get some benefits that a regular employee gets - ie contributions to pension funds, etc. These are often compensated by simply increasing your daily rate. I personally prefer it that way as I often find the benefits offered by the companies unnecessary.
There are also companies like deel.com that offer employers to hire people through their local branch office in pretty much every country in the world. FWIW I haven't used any myself but I have heard good things.
Hence I honestly consider remote working to be a solved problem already, but to each his own.