My current plan is to keep it for 7 - 7.5 years, so I can enjoy at least 1 year without car loan payments, and sell it before the drivetrain warranty expires.
Having said that, 7 years is a very long term for the exponentialy growing EV industry. The technology will change dramatically in the next few years. There is a good chance I will have an urge to upgrade much sooner. On the other hand, if the 2.5 AP Hardware proves to be sufficient for FSD, Tesla continues to support and update this car and the long-term repair statistics is great, I may decide to keep it for 10 years or more.