Navigating the Impact of Tax on Long-Term Investments