Right, but when you're at that point in performance considerations you already have a team of specialists working on multiple angles in performance.
And precisely, for ML code all python libraries run extremely optimized natively compiled code. The language overhead is a minimal consideration. And for business domain code language performance is rarely the limiting factor.
In some companies that team size is a very tiny number of 1.
If it is trying to process ML data, or running in some cloud provider, or deployed in some IoT device supposed to run for years without maintenance, then maybe yes.