Michael Shanks left Stargate SG-1 in season 5, only to return as a series regular in season 7. A spinoff from the movie Stargate, Stargate SG-1 premiered in 1997 to popular and critical acclaim and ran for 10 seasons. Surprisingly, although the concepts were the same, only Michael Shanks' Daniel Jackson remained as a link between the film and the TV show. He remained a series regular until season 5 when Daniel Jackson was brutally killed off, yet the reasons for his return weren't always clear.
https://screenrant.com/why-michael-shanks-left-stargate-sg1/