Can it jettison the luneberg lens if it needs to switch from non-stealth to stealth mode, or is it stuck on for the whole sortie?
Depends on whether it is designed for it.
I see no reason why detachable ventral luneberg lenses would be unable to be jettisoned in the same way any other external store is.
Before retractable luneburg lens became a thing I think that Yankeesama hinted that J-20 had detachable luneburg. However, I wonder if the same technical challenges apply for carrier borne assets. If rust buildup could prevent the mechanism from properly detaching, that is.
Removable luneberg lenses, if able to be jettisoned in flight, would be treated no differently to any other external store, and of course naval aircraft are quite able to have their external stores jettisoned/launched.
The difference between a retractable luneberg lens and a detachable luneberg lens (if the latter is indeed able to be jettisoned in flight), is that the detachable luneberg lens is not a long term fixed mount on the aircraft, but only equipped on an as needed basis.
A retractable luneberg lens OTOH is always there on the aircraft whether it is deployed or not, so in a naval environment the additional maintenance task could produce an unnecessary greater relative risk than simply having it detachable.
In other words, the risk of a retractable luneberg lens on a naval aircraft malfunctioning and being unable to go into "stealth mode" is probably much much higher than a naval aircraft being unable to jettison a store (in this case the detachable luneberg lens).
To be honest I am somewhat impressed that J-20 family and J-35A have retractable luneberg lenses as standard, given even though they are land based aircraft, it still presents an additional mechanical risk and maintenance task for a rather key component that you don't want to malfunction in sortie.
