Might have been nice to mention what it broke at the time, I could perhaps have posted a follow up.
I have trouble believing that the current behaviour of not escaping the escape character is ever right, even if some other callers might need to be adjusted.
Your commit fails to fix _codecs.unicode_escape_encode as it only touches _codecs.escape_encode - if you want a change in that module rather than PyString they both need doing.