As you may or may not be aware the item clear also kills guardians and skeletons, as well as dropped items. This also kills all wither skeletons, strays, and elder guardians
Since the elder guardians don't respawn this can be abused to make ocean monuments incredibly easy to raid (with a little knowledge of how the structure generates).
I think I appreciate the reasoning behind killing these two mobs in particular. Skeletons are popular in grinders and can build up to large numbers, and guardians tend to spawn in huge numbers.
Side note: I would suggest adding cave spiders to the mobs killed by item clear. They are also common xp farms and it's likely to find several spawners next to each other. Meaning they can spawn mobs much faster than skeleton grinders.
Anyway back to the guardians. I'm fairly sure that there is no way to kill guardians and not elder guardians. Instead, I suggest not killing guardians at all during item clear. The reason being that the speed with which they spawn makes it pointless anyway.
Here's a few pics to support this:
Item clear just happened:
Less than 3 minutes later we're back to well over 100 entities
Entities then remained somewhere around 150 until the next item clear
Basically, guardians spawn can spawn fast enough, and the item clears are far enough apart that the number of guardians are only reduced for an ineffectively short period of time. With the exception of the elder guardians.
Let me know what you think.
NJB