This is an interesting discussion.
When I first saw 'The Best of Both Worlds', I simply assumed that Riker returned to his position as executive officer of the Enterprise at Commander rank as per procedure after Picard was recovered.
However, the discussion in this thread makes a convincing case for maintaining Riker's field commission as captain and giving him a seperate command after Wolf 359. This would certainly have been in fitting with the reconstruction efforts underway in Starfleet after the invasion.
The one counterpoint I offer is that Riker requested
to stay on the Enterprise to support his injured Captain. Given the guidance and support Picard had shown to Riker for the three years preceding that time, then it would seem appropriate that Riker remain onboard afterwards to help the family of the Enterprise recover from such a terrible ordeal.
Given the unprecedented events of the Borg invasion, then I imagine that Starfleet would readily have overlooked any regulations in granting his request for the sake of stability on the fleet flagship and in recognition of the valiant efforts of the crew in recovering Picard and subsequently defeating the Borg.
This is certainly fitting with the motivations of the character of Riker. Loyalty to his ship, his crew and his captain undoubtably played a major role in his remaining onboard.