Deleted and Unused Classic Custom Fields remain in transactions

There’s been a recent bug for exactly that that’s been solved in version 23.1.2

What version are you running?