To restrict your uBlock Origin rule to only target <a> elements with an href attribute ending with mysuffix, you can use the following CSS selector:
##li:has-text(mytext) > a[href$="mysuffix"]
Explanation:
a[href$="mysuffix"]: Selects <a> elements where the href attribute ends with mysuffix.
##li:has-text(mytext) > a[href$="mysuffix"]: Combines this with your original rule, so only <a> elements inside <li> with text mytext and an href ending in mysuffix are targeted.