Well, my first idea of what might cause this would have required the switching of camera controller to fix it. So now I'm clueless.
I was able to reproduce it once after random movement for about 10 minutes but none of the debuggung checks I added that time gave me any hints as to why the position is suddenly NaN.
I wasn't able to reproduce it a second time and gave up after 20 minutes of movement. If you have some way to reliably reproduce it, that'll allow me to fix it.
If you notice any other things that strongly correlate with the triggering of the issue, that might also help even if I can't reliably reproduce it. Though tbh at this point I can't even imagine what causes it.
If you've got neither of the above, I'll create a special RM version for you to use which will produce (hopefully sufficient) debugging information to get some lead on the root of the issue.
Johni0702, I have been having a similar issue with my replays also on 1.12.2 I'm using the conquest reforged mod (launcher version) which can be downloaded here:
http://conquestreforged.com/downloads I have found this to reliably produce this issue with every replay (you will have to manually change the optifine version back to C9 however). It generally occurs a few minutes into the replay.