Foreginers are allowed to own a business in Panama (for example, under their name, in an IBC, or a LLC) without having Panamanian Residence or Work Permit.
However, if a foreginer wants to work in his own business, Panamanian laws require him to have a work permit.
See Marcos Kraemer’s explanation in this video.