The final Star Trek: The Next Generation movie, Star Trek: Nemesis, had a deleted alternate ending where Captain Jean-Luc Picard (Patrick Stewart) met the new First Officer of the USS Enterprise-E who replaced Captain William T. Riker (Jonathan Frakes). Star Trek: Nemesis' theatrical cut ended with the death of Lt. Commander Data (Brent Spiner) and Captain Picard realizing that an aspect of Data lives on in his imperfect android brother, B-4. However, a longer and different sequence was filmed that wrapped up other plot points in Star Trek: Nemesis, such as who takes over for Riker as Picard's new Number One.
https://screenrant.com/star-trek-nemesis-picard-riker-replacement-deleted-scene/