This is a fair point, however the programmable infantry airburst rifle concept runs into issues those don't, largely because of the mode of usage and size.
One of the problems with the OICW and XM25 systems was that fitting the electronics that would allow for the programming of the rounds meant there was less space for the explosive charge. Something like a 105mm artillery round would sacrifice a small fraction of the space for the same capability compared to say, a 25mm round. Unlike artillery, which is static when it is being used and fires a number of rounds at the same target, infantry airburst systems are used much more dynamically. They are expected to be banged around and have to repeatedly "re-zero" targets in rapid sucession.
Basically, it works in big guns because theyre big and the technology is matured, and it doesn't work all that well in small guns because theyre small and have additional design challenges.
Im a little late to the party on this one but there are a number of grenade rifles employed by the PLA.
They have a series of 35mm magazine fed grenade launchers that acts as an infantry support weapon, posessing anti-materiel and anti-infantry capability. The most recent one is designated QLU-11 and it has a rangefinding optic that works with programmable airburst munitions as well as normal 35mm grenades.
The QTS-11 is more or less an analogue to the US OICW program. It has a single shot, bolt action 20mm grenade launcher paired with its own rangefinder mounted above what is ultimately a short-barreled QBZ-03. It is believed to be the lightest of these kinds of weapons at around 7kg/15lb fully loaded and the specialized optic attached. The nifty thing about these is that instead of having one high-tech round that does everything it has multiple ammunition types that include both programmable "smart" rounds and traditional "dumb" rounds. The optic pairs with a headset that allows the shooter to look around corners but it can be removed and used with iron sights. Some reports suggest that around 50,000 have been made and that they have been deployed with some mechanized infantry units, which would make it the most successful of the OICW-like weapons. However, I have some doubts about those reports because these rifles haven't been spotted very much, if at all since the mid-2010s. Personally? I think the whole concept has been shown to be a dead-end and that weapons like this just aren't useful enough to justify the downsides of weight, safety, and cost.
also heres a picture of Xi jinpeng holding one