Assuming you mean "with the philosophy of free markets and individual rights" by the catch all "capitalism", it's not.
The foreign buyer is benefiting from state-provided services, such as the police providing some degree of safety from robbery and damage, safety from invasion and confiscation by the armed forces, and a sound legal framework and justice system that protects their property right.
Citizen pay for this via income taxes and their employer's corporate tax, as well as value-added taxes on products and services purchased (since there is no modern country that generally allocates a certain type of tax income to a certain type of spending). Non-resident owners do not. They get a free ride.
Thus, the free market, moral, individual rights protecting solution that might be Barry Goldwater approved is to charge the non-resident owners a yearly tax that covers the cost of services provided.