Having a pilot onboard is overhead and its a limiting
factor for the flight envelope as you have to keep it alive.

The advantages of unmanned craft, and disadvantages of manned craft, are numerous.

There are still plenty of cases where you want human pilots present. There's a lot of realtime decision making by pilots when it comes to identifying, selecting, and firing upon targets.

Remotely-piloted drones rely on seamless drone-to-base communications so they can be, you know, remotely piloted. These communications can be denied by an enemy. As far as autonomous drones that can act on their own without a datalink go, let's just say I think the current SOTA in automonous anything shows it's going to be a long time until we're there.

Also a few of the "obvious" advantages of unmanned craft aren't as relevant as one might think....

Drones can obviously be smaller and more manuverable than manned fighters because they don't have to carry that extra weight (pilot, ejector seat, life support, etc) and because they don't need to worry about g-force restrictions as much. However, the sort of close range high-G dogfighting maneuvering seen in movies is vanishingly rare. It's all about BVR (beyond visual range) missile launches.

Additionally, attack aircraft need to carry missiles and bombs. The missiles and bombs need to be a certain size because they need to carry X kilograms of explosive, Y kilograms of fuel, and Z kilograms of guidance electronics. If you want to put 2, 4, 6, 8 of these on a drone, and give the drone itself some kind of large-enough usable flight range, guess what -- it starts approaching the size and cost of a manned fighter pretty quickly.

As far as optical detection of stealth fighters goes...

(deep breath)

Sure, in some cases.

Probably not in ways that are as useful as you hope. First, there are these things called "clouds" and "nighttime" that are going to put a damper on the visual thing, no matter how good the camera and how smart the AI.

Also I want to point out the scale of modern aerial combat. Air to air missiles and surface to air missiles have ranges up to hundreds of miles.

There is probably a role for some kind of sufficiently smart visual spectrum... something... as part of future sensor networks, augmenting radar. Especially in parts of the world (deserts) where you typically have clear skies.

And as far as sound goes? Since Musk mentioned that too?

I'm just going to point to some basic laws of physics here. Gonna be hard to hear things coming in useful amounts of time if they're going near the speed of sound, and impossible to hear them coming if they're going faster than the speed of sound. There's also some significant lag involved that you don't have with EM spectrum stuff. So even with smart enough analysis the best you're going to be able to do is sort of guess that some stealthy fighters are in an approximate area, assuming you control the ground and have a sufficient number of acoustic sensors scattered all about the place and smart enough sensors. Again, this could be part of some kind of wide-spectrum sensor network fusing lots of different data, maybe, but it's not some kind of "gotcha" that invalidates current stealth hardware.