The USAF already knows how to do this. The QF series of Full Scale Aerial Targets (FSAT). Ex-front line jets, converted to remote control. Key word there - Target.
They've been doing it for decades. Currently, older F-16A, because they ran out of F-4s.
Also, the Predator/Reaper (and others). Remote control.
The reasons that this is not a slam dunk solution for fighters are many.
Latency. The pilot is always just a teeny bit behind what is actually happening. That's just physics. Flying a Predator or Reaper by remote control is fine, because it is just recon, or shooting a slow or stationary target on the ground.
Hackability A person in the cockpit can't be hacked. We've already had an instance of a Predator being spoofed to land/crash somewhere else.
Visibility Instant head and eyeball swivel, in the cockpit, is hard to recreate with cameras.
Long lead time The current F-22 and F-35 have been in development for decades. Long before real remote control for actual fighter jet capabilities would have been an option.
Remote control for a Reaper mission is much different than what is needed in direct air to air combat.
The new B-21 Raider bomber is supposedly going to be "pilot optional". Again, the flight profile for a bomber is quite different than air to air.
Anecdotally, I have heard rumors that the USAF is investigating the QF-16 concept for actual combat.
Bottom line answer to: "Why are there still fighter pilots in cockpits?"
Because the technology and trust has not yet evolved enough for a full solution. The 'trust' is actually trusting your national security to this still evolving tech.