You will find that to obtain an Aircraft Operators Certificate an entity must have the appropriate level of insurance. Therefore the Operator of the aircraft is liable.
Operators judge the competence of pilots by requiring them to have Operators Proficiency Checks.
Pilots engaged as freelancers or contractors are treated as employees albeit temporarily.