If it looks fine, I’d try closing Unity, deleting the library folder for your project, and reopening it. Rebuilding the library folder can be a long process for a large project or slow machine though.
Thanks for the help guys, I tried rebuilding library and updating unity, but the problem persisted. I had to update the lrwp package and the errors dissappeared, I can now safely delete scripts again.