Hi Emily. I faced this same struggle in college. I think it comes down to knowing yourself and your dedication to your studies.
For me, I lived at home and commuted about 25 minutes each one for my first semester. My first semester GPA was very low. So low that I went on academic probation. My second semester, I moved into a dorm on campus and my GPA was a 4.0. The biggest issue for me was the motivation and dedication to get to class and be on time with the added travel. When I lived on campus and could walk to class, this was never an issue.
Before going to school, I wanted to save money and saw living at home as a detriment to the social aspect of college, but did not consider the academic impact. Ultimately, both will be improved by living on campus if you are at all like me. However, if you are highly motivated and determined to make it to class and do well, you can mitigate the impact on your scholastic achievement. But you are also correct that a big piece of the college experience is the immersion in the social aspect and learning how to live on your own. Ultimately, its a decision that only you can make for yourself.