Yes, it is safe to buy real estate in Panama. Foreigners have the same property right protections as Panamanians. There are laws protecting foreign investment. When buying real estate in Panama, using a good lawyer is important to check the status of the property on the public registry and to revise contracts.