Entire Projects Corrupted by "no monobehaviour" bug

Running Unity 2019 and VS 2019. Every project I’ve made has at some point become corrupted. I’ll be editing scripts and then I’ll check on Unity and every script in the project will have the “no monobehaviour…” error message displayed. I have to start a new project, create new scripts, copy all the code into the new scripts, and continue working until it happens again in a couple of days. Does anyone have any ideas?

To be clear, it also ignores the monobehaviour for new scripts containing only the automatically generated default content from Unity (only the empty start and update methods). The class names match the file names exactly. So I can’t even create new scripts in that project anymore.

i was being dumb, which is what I thought the problem would ultimately be.
I had build errors in my code which resulted in Unity telling me it couldn’t find the monobehaviour. Still getting used to the UI in unity. I fixed the error in the file that was bad and all the files came back to functionality.