This functionality is supported only if you are using the Classic Agent.
The Java extension can periodically stop recognizing Java objects on JFC (Swing) applications if the Agent machine, where the Java application is running, is being "viewed" remotely through Virtual Network Computing (VNC), a popular tool that lets you view and control a remote machine.
Avoid using VNC to view the automation which is running.