Re: So did Worf's Change of Heart cost him command of the Enterprise?
Technically, Decker never left the gate. I don't remember if Spock ever took the cadet crew on a training cruise, but when Kirk came aboard Spock insisted on relinquishing command. "First best destiny" or something.
short-story anthology clearly depicts Spock in command of Enterprise
in 2282, about two years before TWOK. Not cannon, of course, but plausible.
Christopher's novel Ex Machina
similarly establishes that Decker really was captain of the Enterprise
during its refit, as he hand-picked nearly the entire crew. The lot was the most diverse compliment of officers to ever serve on a Federation ship.
"He clapped his captain—his friend—on the shoulder. Yes, this man was very much like James Kirk, in all the ways that mattered." --Christopher L. Bennett-- Star Trek: Mere Anarachy, The Darkness Drops Again