Did you ever ask yourself: When will the good ol' .NET Framework retire? The short answer: I don't know, but we can make a good guess! If you check the official page: https://learn.microsoft.com/en-us/lifecycle/products/microsoft-net-framework you will be greeted with the following overview:
That said, we can see that everything beyond .NET Framework 4.7 is still supported (and even .NET FX 4.6.2 still has 2 years). Side note: They are almost drop-in replacements. Therefore upgrading from .NET FX 4.6.2 to 4.8.1 should have a rather small impact and risk.
Anyway: One main driver for the longevity of the framework is that it's bundled with Windows itself. A fresh Windows Server 2022 installation comes with .NET 4.8.1. The EOL date for Windows Server 2022 is October 2031! Source: https://learn.microsoft.com/en-us/lifecycle/products/windows-server-2022 - not only that, even Windows Server 2025 (the latest version) ships the framework, where the extended support ends 3 years later - so 2034!
Therefore it is very likely that .NET Framework 4.8.x will be around until that point (give or take). It might be that there are newer patch version due to security related issues (imagine SHA 2 becomes obsolete/broken and people should switch to something else) will be released.
Of course, for new development, you should resort .NET 8 and onwards if possible, but it is very unlikely that .NET FX is not working anymore anytime soon (whether or not that is a good thing is up to you).