Sure, it’s got a rotary cannon and Sidewinders - and no 4th Gen fighter should go looking to tangle with it.
But the F-35 should be able to shoot down an adversary before ever being spotted.
F-35 is not nearly as stealthy as F-22, but yes, it does have a stealth advantage over 4G fighters. That can serve it as an interceptor, but even as that it has deficiencies. It has limited range and limited speed. Interceptors need to fly fast and far, but F-35 cannot fly fast and far. Its airframe lacks the space for a super cruise engine, so it has to use its limited fuel for afterburners in critical situations. The plane has value, but it was elevated into a mission that it was not designed to perform.