Da fuq? You basically just said someone who has been kidnapped has no right to resume their job after they're rescued.
That's not exactly an analogous circumstance though. Picard in BoBW is more like a POW, and frankly while it's possible he'd someday recover from his captivity, even well enough to perhaps return to duty, it's still also possible that just like real POWs there'd be psychological effects for maybe the rest of his life, even some that might hinder his future capability to command.
I'd be concerned about that even from just his Cardassian imprisonment & torture, let alone what the Borg did to him, which as we later see, still had some kind of imprint on him, enough that I'm not entirely against the fact that Starfleet wouldn't want him & the E anywhere near the epicenter of that conflict in ST:FC, even though he'd prove an asset instead of a liability.
The way I explain BoBW away is that they
did spend some weeks with fancy 24th century rehab for Picard, enough that once he'd grounded himself, back on the homestead, he seemed normal enough, but more importantly, Starfleet's core of starship captains was now devastated, and Riker refusing to step up was a further loss.
So, perhaps they let Picard back so soon because they were willing to take the risk, being that they were in a desperate spot for captains. Who knows? If you wanted, you could even suggest that Riker turning down command at that time might've been specifically
because he didn't want Picard to lose his commission
If he had wanted to stay a captain, he might even have been preferred for the D over Picard, at that point, & that last scene with Shelby was actually after he had already made his choice & neither of them knew the sacrifice he'd made for Picard. By refusing, he might have given them less options, & him staying aboard might have given them more confidence in the overall command crew despite Picard.