The courses are there indefinitely unless an admin deletes it, but most institutions adhere to practices to retain student records. Generally speaking that could be around 10 years but it depends on things like accreditation bodies and government guidelines.
That said, it's a common practice to lock people out of the courses after a few weeks from the term end - perhaps 3 weeks or so to allow for incompletes to submit makeup work. Participants do tend to stay "enrolled" in the course after that, but without access. Upon request, a Canvas administrator can grant access after that point.
All that said, it could be an institutional policy to move a course from a subaccount into an archival subaccount. I haven't heard of that happening but it could be what some institutions do.