How you get there has no bearing on how you leave. Towards the last few weeks, you'll finalize paperwork for how you want to leave, whether it be them giving you a plane ticket to wherever your orders take you (typically Pensacola but may be back to home of record if you get OHARP duty) or drive.
I flew out to OCS but had family drive out for graduation and rode back home with them. I was reimbursed mileage and given 4 days of travel from Newport directly to Pensacola. I took a few days of leave and rode back home with my family to IL for the week and drove down to Pensacola. If you do this, you will only be reimbursed the flat rate for travel from the duty station you are leaving (Newport) directly to the next duty station on your orders.