@mikedoidge
I have tried to answer all your questions below:
Does this issue occur only to the same project?
Yes.
Does it eventually happen to any project?
This issue happened to any of the project. But after creating new project with same code this issue will disappear.
When you create a new project using the same code, as you described, does the issue disappear permanently?
Yes, after creating new project with the same code the issue will disappear.
Where did the original project come from? Was it created with 2018.R1?
The original project was created with v 2.2. But this same issue i am facing with 2018R1 as well.
Also, your screen shots show v2.2, so this issue exists for both 2018.R1 and v2.2?
Yes i am facing this issue both in 2018.R1 and v2.2. But this issue is not occurring in all the projects. Suddenly while compiling this issue will arise and if i will create new project with the same code then this issue will not be present in the new created project.