Nothing in the PR's description is relevant to use, but having a special subcategory if TX_NOT_STANDARD for non-standard inputs seems reasonable.
Our codebase already adds those txid to the recentRejectFilter, so most of the changes do not apply.
This is a backport of [[https://github.com/bitcoin/bitcoin/pull/19620 | core#19620]]
https://github.com/bitcoin/bitcoin/pull/19620/commits/7989901c7eb62ca28b3d1e5d5831041a7267e495