Shadowlands Covenant ability conditional

Please can someone help me with being able to only use macro version 1 when in shadowlands content and macro two when not?
its making the performance of my dps slack when it tries to cast covenant ability when it doesn’t exist as it activates the spell " /cast Covenant Ability " and effects GCD even though no spell goes off

this is the one i mean, not the actual spell
Covenant Ability - Spell - World of Warcraft (wowhead.com)

Yes I can help you - it’s not possible. GSE has no way of knowing that the content you are in is not SL content