Fixes partially broken Python bindings (#91791) by removing workaround (#26304) no longer needed in the 4.x series.