I have a "love/hate" thing with Riker. At times I think his character is good and adds well to the series. At other times, I find him stiff, boring, and predictable. Once in a while, Frakes does a great job with the character. I don't know why he couldn't maintain that... unless it was various factors such as writing, directing, and his patience with the show.
Here's a scenario I would have liked to see:
In BOBW, when Picard has rehabilitated, Riker has another offer for commanding a starship. Starfleet is insistent that he take one this time, because of the extreme shortage of captains. Picard also pushes him and then, informs him that he already has a new XO selected: Shelby. We see a heart-torn Deanna watching Riker leave the ship, as he heads off to command the soon-to-be rebuilt Melbourne.
At first, Shelby has too much of the "star" syndrome, trying to impress everyone and outdo folks like Geordi and Worf. She has a few run-ins with Deanna too. But, after a few episodes, she seems to settle into the role. It's strange without Riker, but we start feeling like we could like Shelby.
Later, about 3/4 of the way through the season, we have an episode where the Melbourne sends out a distress signal. Although another vessel has acknowledged and responded, the Enterprise gets wind of it and Picard decides to postpone the current mission to go assist, because they could reach the ship within a day. Later, they find the Melbourne is seriously damaged with barely any life support operating. Data reports that he detects Borg signatures in the vicinity. They discover that Riker is one of the few crew members still alive, much to everyone's relief.. According to the ships logs, the Melbourne engaged a small Borg scout vessel that turned out to be more formidable than they anticipated. Picard is surprised that Riker attempted to take on the Borg without retreating first and calling for assistance (the Federation has a standing order that no Starfleet vessels should attempt to engage the Borg alone, with the mandate to flee at all costs).
While Riker is being tended to by Dr. Crusher and everybody is busy trying to figure out all of the details of what happened, Shelby heads over to the Melbourne of her own accord to investigate further. At that point, another Borg cube is detected on long range scanners. Picard decides it best to get away before they are detected. And they do... unknowingly leaving Shelby behind.
O'Brien later reports that Shelby was the last person to use the transporter, and beamed over to the Melbourne, thus solving the mystery of her disappearance. Picard concludes it's unsafe to return for a rescue and notes in his log that she was very likely assimilated by the Borg. Admiral Nechayev informs Picard that Riker is to be demoted back to Commander, as Starfleet decides that Riker's actions were likely reckless, causing the loss of ship and crew. Picard is tasked as a "rehabilitation mentor" for Riker, returning him to the role of XO aboard the Enterprise.