I wish to thank the mozilla team for their efforts into implementing :has() into firefox.I have updated to v.121 and it seems to work without any problems.
It seems like the :layout.css.has-selector.enabled Option in about:config is still not activated by default in the 119 public version that just got out.The only way to have it by default is to use nightly.