The UK requires tax records to be held for 6 years after the tax return deadline, or if you submit the return late, 6 years from when you file it. That means in practice for about 7-8 years from when the transaction took place.
If you are required to hold records for tax purposes, whether it is HMRC, IRS or anyone else, that's fine. The GDPR doesn't interfere with that. It only gets involved if you start using your tax records for another purpose.