Last week Vince Shuurman blogged about having to recompile when opening an XPage app in Domino Designer.
I had the same issue. I was using some Java code in an XPage, and every time I opened the app in designer, I got ClassNotFoundException when opening the XPage. A build of the project fixed the issue.
My java code was in the new Java design element (new in Domino 8.5.3), so I suspected that it might have something to do with this.
I moved the code to a "custom" java source folder, and the error went away. Closing/opening the app in Designer did not result in ClassNotFoundException.