Yes it is
When buying a property in Costa Rica, the property title of the current owner must be transferred to the new buyer.
However, if the property belongs to a duly registered company in Costa Rica, the seller can sell the shares of the company to the buyer. This helps you reduce the transfer taxes and the transfer of property title, although for this it is essential to know the history of that company to know if it has any type of debt or default, obligation to third parties, lawsuits, etc. Remember that when you buy a company, you buy all your obligations, both current and past, that is why the lawyer must thoroughly review the company before making the transfer.