Seems like every time when you close com-port, grbl loose current position and when you open port next time, it thinks we are on position 0-0-0.
I suspect saving values in the Arduino's EEPROM would require a re-write of GRBL unless it already has that capability. I would advise against any re-writing.
The problem is that the PC causes the Arduino to reset when it OPENS the serial port. You need to prevent that.
The simplest solution is for the PC program to keep the serial connection open until it is completely finished with the Arduino.
If that's not practical my preferred solution depends on whether you can connect directly to the Rx and Tx (and GND) connections of the Uno. If you can then use a USB-TTL cable to communicate with the Uno rather than the regular USB cable. As only Rx and Tx are connected it will not cause a reset.
Alternatively it may be possible to prevent the reset if you can disable your PS program from activating the DSR or DTS signal when it opens the serial port. I suggest you write a short Arduino program for testing - one that blinks an LED a few times in setup() and then does nothing else. If the LED blinks you will know that the reset has been triggered.
There are other ways to prevent the reset, including cutting a trace on the Uno board. But the reset feature is an essential part of the normal Arduino process for uploading programs so I would be reluctant to make a permanent change.
...R