If they wanted to keep running, they literally could have just pivoted the story to follow a different Timelord, but kept The Doctor as a separate entity whose story has ended.
Dont get me wrong, Capaldi had some great episodes (Time Heist being in my top 5), but quality went down starting with him.