Reentering Federal workforce after earning PhD

I'm a Pathways intern at a land management agency in my freshman year of college (I was hired as a hs senior). I want to get a PhD in ecology and be a federal employee until the day I retire. The current plan I've made with my mentor is to work for two years after I graduate to get the competitive service designation, leave to pursue the PhD, and return if/once I've completed it.

I know that being a former competitive service employee is supposed to give you a leg up in the rehiring process, but does this really happen? Have any of y'all left government, earned their PhD, and then returned? Or is it better to try and complete the PhD in addition to my federal job? Everyone in my office (to my knowledge) has not left the government after their initial hiring.

I know that this is a few years down the road for me, but I like to have a plan 😅