If I understand correctly, this is one of the changes that caused the regression:
https://github.com/python/cpython/pull/117120