Invalid MIT-MAGIC-COOKIE-1 key

Thanks for your help

1°) I am using Putty only for “testing”
In production, the Java server (running on the Pi) launchs the Java Gui application by executing a shell command which executes a bash file containing “export DISPLAY=:0” and "java -jar nameofJavaFxapplication.jar)

2°) I reboot the system. I log as root and I execute

xauth generate :0 . trusted
xauth list

And I get the same list of 4 MIT-MAGIC-COOKIE-1
(see my picture sent before)

3°) I am (truly) not a specialist but I think the issue is not the way of connecting (all was running well for months before). From my (poor) understanding (built with Google), the issue is coming from these keys in the .Xauthority file ??? Is it possible to remove the .Xauthority file (depending of Google, a new file will be created at the next connection eliminating the “invalid MIT-MAGIC-COOKIE-1 key” error) ? What is the rule of these keys in the file ?

One more time, thanks for the time you spend