Hi @VishnuSa1 ,Can you try to save the changes once the node properties is updated, you can do it by using resourcereolver.Add below line of code after setting the file reference property:
properties.put(GenAIConstants.FILE_REFERENCE, fileReferencePath);
resourceResolver.commit(); // Save the change...