The hard truth is: Working in a company helps you grow your coding, communication, and problem-solving skills, making you a better freelancer. 
On the other hand, a freelancer who has never worked in a corporate setting often remains a junior developer with limited experience.