What really limits electric vehicles for racing is weight and batteries. Weight is always bad, and batteries are heavy. And batteries can overheat, which means going into limp mode. The overheating seems to be getting solved relatively quickly, but the weight of batteries isn't going to come down drastically any time soon.
They're just different - electric is better in a lot of ways and gasoline is better in a lot of ways. I don't think you'll see electric cars doing endurance racing anytime soon.