Library not being recognized using Red

I add my own library (mylib) to red.xml
and its appearing in ‘Robot Referenced Libraries’ without an error.
But then in my test file mytests.robot
I add:
Library framework.services.mylib WITH NAME mylib

and its not recognized (appears with the red line under it), but still actually works when I use it in my tests.
I use Robot 3.8 on Ubuntu
Any idea what could be wrong?
I tired the ctrl+1 to auto search for the library
Thanks