But let's assume we make an AI just as capable as a human in all respects. It will probably be more complex than GPT-3, which requires about 4 to 8 of the largest GPUs to run. If you want to replace a human you'd have to run it in the loop, 20-40 times a second. The energy required to run it would be much greater than that used by a human.
Besides energy, it would need some of the most complex chips which can only be produced by TSMC today, and depend on a single company capable of manufacturing the high end lasers. The cost of building a fab that can make these chips is huge even for a country.
What I am getting at - we can't replace everyone with AI because we can't make the chips and afford the energy. Not for a good while. And that's assuming we solve the hard AI problem somehow. What we can afford is to replace a few humans with AI.
I didn't even mention the cost of building robotic bodies for all these AIs to act in the physical world. We don't have that kind of mechatronics yet.
Some singularity enthusiasts think by 2030 all jobs will be taken by AI. I believe the timespan will be much longer, allowing humans to gradually transition into a different world. We can't even replace the whole fleet of IC cars with EVs until 2030's.