The ejector is not the same from 9mm to .40/.357, but I've fired thousands of rds through mix and match ejectors and never had a malfunction.
My primary G17 has a .40 ejector in it (got it used) and has never malf'd.
My G23 has a G19 top end, as well. Never malf'd.
"Obama has ordered the launching of more Tomahawk cruise missiles than All the other Nobel Peace Prize winners combined."