How do I change Z safe homing coordinates in the G-code , not in Marlin
Don’t home the Z. Rather measure the height of your print to continue at with calipers. Or with detective work in your G-code preview, finding the layer your print stopped at and finding the Z height of that layer. The direction of the infill can be a clue. Then carefully lower your Z-axis until your nozzle is at the right height for your next layer (so get the nozzle .2 mm above your printed layer if you’re doing .2 mm layers).
Edit your print G-code to change G28, to be G28 X0 Y0, so that it only homes X and Y, not Z. Erase any line with G29 (auto-leveling routine), or it will crash into your print. After the G28 X0 Y0 line, enter G92 Z[your starting Z layer height in mm] that spoofs the Z position to the 3D printer, and it shouldn’t need to home. Then edit the rest of the G-code to start at the next layer of your resumed print.
Leave all the beginning commands that do setup, temperature, and erase the lines beginning with the movement, lots of G1 commands. Find the G1 Z[your resumed layer height] command and begin there, that’s the beginning of the layer. Make sure there’s an existing G92 E0 that resets the extruder distance, and the layer starts from a reset extruder position, you don’t want it to frantically dump a bunch of plastic on your print at the first extrude command (that’s one danger of resuming in in the middle of a layer).
Get everything heated up before you hit print, home the X and Y, stay in that position, and prime the nozzle. You can even hold something flat under the nozzle to keep it primed while you start the print, and have some tweezers handy to catch the goober on the hot end, so it doesn’t wipe it on your print. It helps to have a retract move when you begin, many slicers have a retract move when it advances to the next layer, you may want to start your G-code on that line if it’s before the line with the G1 Z [your layer height].