The issue happens to me after I updated to Idea 2020.1 EAP.
Sometimes after I switch between branches with different dependencies (maven project),
Idea editor shows some project classes references as red as they are not found
though both `mvn compile` and `build project` (Ctlr+F9) button works perfectly.
The issue goes away if I "Restart and invalidate caches".