My spouse is a federal civilian employee with a scientific background and a special pay rate accommodation for it. Relative to her industry the pay discrepancy is still about 20% lower. In software roles the top end of the career is roughly the starting pay of junior developers everywhere else. It's not just lower, it's horribly lower.
They can absolutely make adjustments if congress needed or wanted to. The DoD as of 2019 does direct officer commissions for cybersecurity roles bringing people in as majors IIRC (it's still not as good pay as civilian cybersecurity roles but the gap is smaller and it has the prestige and lifetime benefits of being an officer).
With that attitude, the pay will always be lower. Letting the dogma be self-reinforcing isnt the winning strat. The difference isnt even benefits, retirement, and pension. Maybe in the 80/90s or even 00s that was the case, but it's a dead philosophy carried by dead justifications.
The (employment) contract value should be the same, not the pay.
There is less inherent risk for public sector jobs than for companies that can go bankrupt. Hence for the contract value to be the same, the pay needs to be a bit lower.
A nice balance might be working somewhere as a civilian contractor for those government projects.