Hello, I also am new here and new to JavaFX and I happened upon this post when looking for what JavaFX can do and it caught my attention.
I am by no means an expert, I started looking in to JavaFX a little over a week ago and have no prior experience in JavaFX animations.
With that said, with a little
testing it seems that you are creating a path for a sphere to follow and then moving that path around, problem seems to be that once an animation has started, it's path cannot be altered, you would need to stop() and play() it after the path has changed and would not work since the path moves around constantly.
Backed with this information I thought that the paths and sphere do move along with the pane they are in.
So I added a new Anchorpane that is bound to the earth spheres location and added the moon into that instead and the result seems to be what you wanted.
I also commented some code that I deemed unnecessary since the path cannot change so there is no need to move it.
There may be alternative methods but this atleast works, hope it helps.